SHA: 1f6b84f445
It turns out, `sw_vers` prints an empty stderr line and we inherit it.
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
This commit is contained in:
parent
8f1f97f508
commit
786bb337f0
|
|
@ -457,7 +457,7 @@ function determineUserAgent(): string {
|
||||||
osIdentifier = 'windows';
|
osIdentifier = 'windows';
|
||||||
osVersion = `${version[0]}.${version[1]}`;
|
osVersion = `${version[0]}.${version[1]}`;
|
||||||
} else if (process.platform === 'darwin') {
|
} 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';
|
osIdentifier = 'macOS';
|
||||||
osVersion = `${version[0]}.${version[1]}`;
|
osVersion = `${version[0]}.${version[1]}`;
|
||||||
} else if (process.platform === 'linux') {
|
} else if (process.platform === 'linux') {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue