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

spawn-cmd

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spawn-cmd

Wraps child_process.spawn with 'cmd /c <command>' when it's a windows machine

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.8K
decreased by-18.51%
Maintainers
1
Weekly downloads
 
Created
Source

spawn-cmd

child_process.spawn ignores PATHEXT on Windows:

https://github.com/joyent/node/issues/2318

This tiny shim provides a uniform interface to spawn a process on linux and windows:

var spawn = require('spawn-cmd').spawn;

var echo = spawn('echo', ['OHRLLY']);

echo.stdout.on('data', function() { ... });

This doesn't make commands portable, because this library doesn't do any translation of unix commands to their windows equivalents. It just uses the 'comspec' environment variable on windows. You might want to look at this if you want more:

https://github.com/ForbesLindesay/win-spawn

Keywords

FAQs

Package last updated on 19 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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