# spawn-cmd

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

Latest version **0.0.2** (published 2014-01-19) · BSD license · 0 weekly downloads

## Install

```sh
npm install spawn-cmd
pnpm add spawn-cmd
yarn add spawn-cmd
bun add spawn-cmd
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2014-01-19 |
| First published | 2013-12-01 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | @joshski |
| Maintainers | joshski |
| Keywords | windows, child_process |

## Links

- npm: https://www.npmjs.com/package/spawn-cmd
- Repository: https://github.com/featurist/spawn-cmd
- Issues: https://github.com/featurist/spawn-cmd/issues
- npm.io page: https://npm.io/package/spawn-cmd

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2014-01-19
- 0.0.1 — 2013-12-01

## README

# 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

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