@nexssp/os
Advanced tools
Comparing version 2.0.32 to 2.0.33
@@ -21,3 +21,7 @@ const cache = {} | ||
} else if (process.platform !== 'win32') { | ||
return execSync('cat /etc/os-release').toString().trim() | ||
try { | ||
return execSync('cat /etc/os-release').toString().trim() | ||
} catch (e) { | ||
return `NAME=${process.platform}` | ||
} | ||
} | ||
@@ -47,2 +51,9 @@ } | ||
return item ? data[item] : data | ||
} else if (platform === 'android') { | ||
const data = { | ||
ID: 'android', | ||
NAME: 'Android', | ||
PRETTY_NAME: `Android`, | ||
} | ||
return item ? data[item] : data | ||
} else { | ||
@@ -106,2 +117,3 @@ const releaseData = osReleaseSync() | ||
MACOSX: 'Mac OS X', | ||
ANDROID: 'Android', | ||
} |
@@ -106,2 +106,3 @@ const { distros } = require('./distro') | ||
return pms.EMERGE[operation] | ||
case distros.ANDROID: | ||
case distros.FREEBSD: | ||
@@ -108,0 +109,0 @@ return pms.PKG[operation] |
{ | ||
"name": "@nexssp/os", | ||
"version": "2.0.32", | ||
"version": "2.0.33", | ||
"bin": { | ||
@@ -5,0 +5,0 @@ "nexssp-os": "bin/nexssp-os.js" |
# @nexssp/os | ||
**07.05.2023** - FIX: Support for android platforms (experimental) | ||
**05.05.2023** - FIX: /etc/os-release to determine linux distro - fix by: @qihangnet | ||
@@ -4,0 +5,0 @@ **20.03.2023** - FIX: fails to return info on CentOS: fix by: @DonJayamanne |
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
33627
762
191