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

foreground-child

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

foreground-child - npm Package Compare versions

Comparing version 1.3.4 to 1.3.5-beta.0

19

index.js

@@ -5,2 +5,3 @@ var signalExit = require('signal-exit')

var fs = require('fs')
var which = require('which')

@@ -12,2 +13,14 @@ function needsCrossSpawn (exe) {

try {
exe = which.sync(exe)
} catch (er) {
// failure to find the file? cmd probably needed.
return true
}
if (/\.(com|cmd|bat)$/i.test(exe)) {
// need cmd.exe to run command and batch files
return true
}
var buffer = new Buffer(150)

@@ -17,3 +30,7 @@ try {

fs.readSync(fd, buffer, 0, 150, 0)
} catch (e) {}
} catch (e) {
// If it's not an actual file, probably it needs cmd.exe.
// also, would be unsafe to test arbitrary memory on next line!
return true
}

@@ -20,0 +37,0 @@ return /\#\!(.+)/i.test(buffer.toString().trim())

7

package.json
{
"name": "foreground-child",
"version": "1.3.4",
"version": "1.3.5-beta.0",
"description": "Run a child as if it's the foreground process. Give it stdio. Exit when it exits.",

@@ -11,6 +11,7 @@ "main": "index.js",

"cross-spawn-async": "^2.1.1",
"signal-exit": "^2.0.0"
"signal-exit": "^2.0.0",
"which": "^1.2.1"
},
"devDependencies": {
"tap": "^4.0.0"
"tap": "^5.1.1"
},

@@ -17,0 +18,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

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