Comparing version 0.0.2 to 0.0.3
@@ -77,1 +77,5 @@ var isWindows = process.platform === 'win32' | ||
memo('shell', function () { | ||
return isWindows ? process.env.ComSpec || 'cmd' | ||
: process.env.SHELL || 'bash' | ||
}) |
{ | ||
"name": "osenv", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"main": "osenv.js", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -59,1 +59,6 @@ # osenv | ||
`notepad.exe` on Windows. | ||
## osenv.shell() | ||
The SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash' | ||
or 'cmd'. |
@@ -24,2 +24,3 @@ // only run this test on windows | ||
process.env.VISUAL = 'visualedit' | ||
process.env.SHELL = 'zsh' | ||
@@ -69,3 +70,9 @@ | ||
t.equal(osenv.shell(), 'zsh') | ||
process.env.SHELL = '' | ||
delete require.cache[require.resolve('../osenv.js')] | ||
var osenv = require('../osenv.js') | ||
t.equal(osenv.shell(), 'bash') | ||
t.end() | ||
}) |
@@ -27,2 +27,3 @@ // only run this test on windows | ||
process.env.VISUAL = 'visualedit' | ||
process.env.ComSpec = 'some-com' | ||
@@ -75,3 +76,9 @@ tap.test('basic windows sanity test', function (t) { | ||
t.equal(osenv.shell(), 'some-com') | ||
process.env.ComSpec = '' | ||
delete require.cache[require.resolve('../osenv.js')] | ||
var osenv = require('../osenv.js') | ||
t.equal(osenv.shell(), 'cmd') | ||
t.end() | ||
}) |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
10633
204
64
74