Comparing version 1.2.0 to 1.2.1
10
index.js
@@ -78,3 +78,11 @@ 'use strict'; | ||
if (process.platform === 'win32') { | ||
var stdout = execFileSync('wmic', ['os', 'get', 'locale'], {encoding: 'utf8'}); | ||
var stdout; | ||
try { | ||
stdout = execFileSync('wmic', ['os', 'get', 'locale'], {encoding: 'utf8'}); | ||
} catch (err) { | ||
cache = 'en_US'; | ||
return cache; | ||
} | ||
var lcidCode = parseInt(stdout.replace('Locale', ''), 16); | ||
@@ -81,0 +89,0 @@ cache = lcid.from(lcidCode) || 'en_US'; |
{ | ||
"name": "os-locale", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Get the system locale", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4486
83