# cross-spawn-async

> Cross platform child_process#spawn

Latest version **2.2.5** (published 2016-10-27) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install cross-spawn-async
pnpm add cross-spawn-async
yarn add cross-spawn-async
bun add cross-spawn-async
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.2.5 |
| Published | 2016-10-27 |
| First published | 2015-07-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 66 |
| Author | IndigoUnited |
| Maintainers | satazor |
| Keywords | spawn, windows, cross, platform, path, ext, path-ext, path_ext, shebang, hashbang, cmd, execute |

## Links

- npm: https://www.npmjs.com/package/cross-spawn-async
- Repository: https://github.com/IndigoUnited/node-cross-spawn-async
- Homepage: https://github.com/IndigoUnited/node-cross-spawn-async#readme
- Issues: https://github.com/IndigoUnited/node-cross-spawn-async/issues/
- npm.io page: https://npm.io/package/cross-spawn-async

## Dependencies (2)

- [which](https://npm.io/package/which.md) ^1.2.8
- [lru-cache](https://npm.io/package/lru-cache.md) ^4.0.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 2.2.5 (latest) — 2016-10-27
- 2.2.4 — 2016-05-18
- 2.2.3 — 2016-05-18
- 2.2.2 — 2016-04-13
- 2.2.1 — 2016-04-06
- 2.2.0 — 2016-04-06
- 2.1.9 — 2016-02-20
- 2.1.8 — 2016-01-27
- 2.1.7 — 2016-01-25
- 2.1.6 — 2016-01-02
- 2.1.5 — 2016-01-02
- 2.1.4 — 2016-01-02
- 2.1.3 — 2016-01-02
- 2.1.2 — 2016-01-02
- 2.1.1 — 2015-12-07
- … 6 more at https://npm.io/package/cross-spawn-async/versions

## README

# cross-spawn-async

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]

[npm-url]:https://npmjs.org/package/cross-spawn-async
[downloads-image]:http://img.shields.io/npm/dm/cross-spawn-async.svg
[npm-image]:http://img.shields.io/npm/v/cross-spawn-async.svg
[travis-url]:https://travis-ci.org/IndigoUnited/node-cross-spawn-async
[travis-image]:http://img.shields.io/travis/IndigoUnited/node-cross-spawn-async/master.svg
[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn-async
[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn-async/master.svg
[david-dm-url]:https://david-dm.org/IndigoUnited/node-cross-spawn-async
[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-cross-spawn-async.svg
[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-cross-spawn-async#info=devDependencies
[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-cross-spawn-async.svg

A cross platform solution to node's spawn.

**This module is deprecated, use [cross-spawn](https://github.com/IndigoUnited/node-cross-spawn) instead which no longer requires a build toolchain.**


## Installation

`$ npm install cross-spawn-async`


## Why

Node has issues when using spawn on Windows:

- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
- It does not support [shebangs](http://pt.wikipedia.org/wiki/Shebang)
- It does not allow you to run `del` or `dir`
- It does not properly escape arguments with spaces or special characters

All these issues are handled correctly by `cross-spawn-async`.
There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments.


## Usage

Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options), so it's a drop in replacement.

```javascript
var spawn = require('cross-spawn-async');

var child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
```


## Tests

`$ npm test`


## License

Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).

---
_Source: https://npm.io/package/cross-spawn-async · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
