fix(mac): avoid printing empty line to stderr on mac (#11991)
It turns out, `sw_vers` prints an empty stderr line and we inherit it.
This commit is contained in:
parent
6904b3294e
commit
1f6b84f445
|
|
@ -457,7 +457,7 @@ function determineUserAgent(): string {
|
|||
osIdentifier = 'windows';
|
||||
osVersion = `${version[0]}.${version[1]}`;
|
||||
} else if (process.platform === 'darwin') {
|
||||
const version = execSync('sw_vers -productVersion').toString().trim().split('.');
|
||||
const version = execSync('sw_vers -productVersion', { stdio: ['ignore', 'pipe', 'ignore'] }).toString().trim().split('.');
|
||||
osIdentifier = 'macOS';
|
||||
osVersion = `${version[0]}.${version[1]}`;
|
||||
} else if (process.platform === 'linux') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue