Skip to content

Commit 59a50d0

Browse files
committed
chore: improve readme
1 parent cf1c779 commit 59a50d0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ Node has issues when using spawn on Windows:
3030

3131
- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
3232
- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix))
33-
- No `options.shell` support on node `<v4.8`
3433
- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367)
35-
- Has problems running commands with posix relative paths (e.g.: `my-folder/my-executable`)
36-
- Circuvents an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) around command shims (files in node_modules/.bin/), where arguments with quotes and parenthesis would result in an [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149)
34+
- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`)
35+
- Circuvents an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) around command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in an [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149)
36+
- No `options.shell` support on node `<v4.8`
3737

3838
All these issues are handled correctly by `cross-spawn`.
3939
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.
@@ -59,11 +59,12 @@ var results = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit
5959

6060
### Using `options.shell` as an alternative to `cross-spawn`
6161

62-
Starting from node `v4.8`, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves most of the problems that `cross-spawn` attempts to solve, but:
62+
Starting from node `v4.8`, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves
63+
the [PATHEXT](https://github.com/joyent/node/issues/2318) issue but:
6364

6465
- It's not supported in node `<v4.8`
6566
- You must manually escape the command and arguments which is very error prone, specially when passing user input
66-
- It just solves the [PATHEXT](https://github.com/joyent/node/issues/2318) issue from the [Why](#why) section
67+
- There are a lot of other unresolved issues from the [Why](#why) section that you must take into account
6768

6869
If you are using the `shell` option to spawn a command in a cross platform way, consider using `cross-spawn` instead. You have been warned.
6970

0 commit comments

Comments
 (0)