Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

osenv

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

osenv - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

4

osenv.js

@@ -77,1 +77,5 @@ var isWindows = process.platform === 'win32'

memo('shell', function () {
return isWindows ? process.env.ComSpec || 'cmd'
: process.env.SHELL || 'bash'
})

2

package.json
{
"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()
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc