You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove NodeJS v0.10 and v0.12 support
- Change escaping on Windows to use `^` instead of quotes:
- Fix a bug that made it impossible to escape an argument that contained quotes followed by `>` or other special chars, e.g.: `"foo|bar"`, fixes#82
- Fix a bug were a command containing `%x%` would be replaced with the contents of the `x` environment variable, fixes#51
- Fix `options` argument being mutated
Copy file name to clipboardExpand all lines: CHANGELOG.md
+17
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,20 @@
1
+
## 6.0.0 - 2017-11-10
2
+
3
+
- Remove NodeJS v0.10 and v0.12 support
4
+
- Change escaping on Windows to use `^` instead of quotes:
5
+
- Fix a bug that made it impossible to escape an argument that contained quotes followed by `>` or other special chars, e.g.: `"foo|bar"`, fixes [#82](https://github.com./IndigoUnited/node-cross-spawn/issues/82)
6
+
- Fix a bug were a command containing `%x%` would be replaced with the contents of the `x` environment variable, fixes [#51](https://github.com./IndigoUnited/node-cross-spawn/issues/51)
7
+
- Fix `options` argument being mutated
8
+
9
+
10
+
## 5.1.1 - 2017-02-26
11
+
12
+
- Fix `options.shell` support for NodeJS [v4.8](https://github.com./nodejs/node/blob/master/doc/changelogs/CHANGELOG_V4.md#4.8.0)
Copy file name to clipboardExpand all lines: README.md
+8-4
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Node has issues when using spawn on Windows:
35
35
- It ignores [PATHEXT](https://github.com./joyent/node/issues/2318)
36
36
- It does not support [shebangs](http://pt.wikipedia.org/wiki/Shebang)
37
37
- No `options.shell` support on node `<v4.8`
38
-
-It does not allow you to run `del` or `dir`
38
+
-Has problems running commands with [spaces](https://github.com./nodejs/node/issues/7367) when `options.shell` is specified
39
39
40
40
All these issues are handled correctly by `cross-spawn`.
41
41
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.
####`options.shell` as an alternative to `cross-spawn`
62
+
###Using`options.shell` as an alternative to `cross-spawn`
63
63
64
64
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:
65
65
66
66
- It's not supported in node `<v4.8`
67
-
- It has no support for shebangs on Windows
68
67
- You must manually escape the command and arguments which is very error prone, specially when passing user input
69
68
70
69
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.
71
70
71
+
### `options.shell` support
72
72
73
-
#### Shebangs
73
+
While `cross-spawn` adds support for `options.shell` in node `<v4.8`, all of its awesome features are disabled.
74
+
75
+
This means that no shebangs are supported nor the command and arguments are escaped. This is by design because if you are using `options.shell` you are probably targeting a specific platform anyway.
76
+
77
+
### Shebangs support
74
78
75
79
While `cross-spawn` handles shebangs on Windows, its support is limited: e.g.: it doesn't handle arguments after the path, e.g.: `#!/bin/bash -e`.
0 commit comments