Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 20, 2024 via pnpm

cross-spawn 7.0.3

Cross platform child_process#spawn and child_process#spawnSync
Package summary
Share
0
issues
2
licenses
4
MIT
2
ISC
Package created
30 Jun 2014
Version published
25 May 2020
Maintainers
1
Total deps
6
Direct deps
3
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
4 Packages, Including:
cross-spawn@7.0.3
path-key@3.1.1
shebang-command@2.0.0
shebang-regex@3.0.0

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
isexe@2.0.0
which@2.0.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of cross-spawn 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
path-key3.1.12.21 kBMIT
prod
shebang-command2.0.01.47 kBMIT
prod
which2.0.24.39 kBISC
prod

Visualizations

Frequently Asked Questions

What does cross-spawn do?

Cross-spawn is a Node.js package providing a cross-platform solution to Node's built-in spawn and spawnSync functions. It addresses several issues present when using spawn on Windows, such as ignoring PATHEXT, lack of shebang support, and issues with commands having spaces, among others. Cross-spawn handles these problems correctly, making it a useful module for developers looking to run child processes across different operating systems.

How do you use cross-spawn?

To use cross-spawn, developers can install it using npm with the command $ npm install cross-spawn. For Node.js versions 7 and below, use $ npm install cross-spawn@6. Once installed, the module can be required in a JavaScript file and used just like Node's regular spawn and spawnSync. Below is an example:

const spawn = require('cross-spawn');

// Spawn NPM asynchronously
const child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });

// Spawn NPM synchronously
const result = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });

In this example, NPM is spawned asynchronously first, then synchronously. Both invocations use 'npm' as the command, followed by a list of arguments, and configuration options.

Where are the cross-spawn docs?

Detailed documentation for cross-spawn can be found in its README file on its GitHub repository, located at git+ssh://git@github.com/moxystudio/node-cross-spawn.git. The README contains information on why developers might use cross-spawn, usage instructions, and notes on certain caveats related to using this module.