cross-spawn-cb 0.6.8 → 0.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/polyfills.js +1 -1
- package/lib/spawnCallback.js +4 -0
- package/lib/spawnSyncCallback.js +4 -0
- package/package.json +6 -6
package/lib/polyfills.js
CHANGED
|
@@ -8,7 +8,7 @@ if (!path.delimiter) path.delimiter = process.platform === 'win32' ? ';' : ':';
|
|
|
8
8
|
|
|
9
9
|
var cp = require('child_process');
|
|
10
10
|
if (!cp.spawnSync) {
|
|
11
|
-
var spawnCallback = __dirname + '
|
|
11
|
+
var spawnCallback = path.join(__dirname, + 'spawnCallback.js');
|
|
12
12
|
|
|
13
13
|
var functionExec = null; // break dependencies
|
|
14
14
|
cp.spawnSync = function spawnSyncPolyfill(cmd, args, options) {
|
package/lib/spawnCallback.js
CHANGED
|
@@ -50,6 +50,10 @@ module.exports = function spawnCallback(command, args, options, callback) {
|
|
|
50
50
|
}
|
|
51
51
|
res.output = [null, res.stdout, res.stderr];
|
|
52
52
|
|
|
53
|
+
// patch: early node on windows could return null
|
|
54
|
+
if (res.status === null) console.log('spawnCallback null status code', res);
|
|
55
|
+
// res.status = res.status === null ? 0 : res.status;
|
|
56
|
+
|
|
53
57
|
// process errors
|
|
54
58
|
var err = res.status !== 0 ? new Error('Non-zero exit code: ' + res.status) : null;
|
|
55
59
|
if (res.stderr && res.stderr.length) {
|
package/lib/spawnSyncCallback.js
CHANGED
|
@@ -12,6 +12,10 @@ module.exports = function spawnSyncCallback(command, args, options) {
|
|
|
12
12
|
|
|
13
13
|
var res = spawnSync(command, args, syncOptions);
|
|
14
14
|
|
|
15
|
+
// patch: early node on windows could return null
|
|
16
|
+
if (res.status === null) console.log('spawnSyncCallback null status code', res);
|
|
17
|
+
// res.status = res.status === null ? 0 : res.status;
|
|
18
|
+
|
|
15
19
|
// pipe if inherited
|
|
16
20
|
if (res.stdout && (options.stdout === 'inherit' || options.stdio === 'inherit')) {
|
|
17
21
|
process.stdout.write(res.stdout);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cross-spawn-cb",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.11",
|
|
4
4
|
"description": "Cross spawn with a completion callback",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cross-spawn",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"buffer-v6-polyfill": "^1.0.5",
|
|
30
30
|
"core-js": "^3.24.1",
|
|
31
31
|
"cross-spawn": "^7.0.3",
|
|
32
|
-
"function-exec-sync": "^0.2.
|
|
32
|
+
"function-exec-sync": "^0.2.8",
|
|
33
33
|
"next-tick": "^1.1.0",
|
|
34
34
|
"once": "^1.4.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@babel/preset-env": "^7.18.
|
|
37
|
+
"@babel/preset-env": "^7.18.10",
|
|
38
38
|
"@rollup/plugin-babel": "^5.3.1",
|
|
39
39
|
"@rollup/plugin-commonjs": "^22.0.1",
|
|
40
40
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
41
|
-
"@typescript-eslint/parser": "^5.
|
|
41
|
+
"@typescript-eslint/parser": "^5.32.0",
|
|
42
42
|
"cr": "^0.1.0",
|
|
43
43
|
"depcheck": "^1.4.3",
|
|
44
44
|
"eslint": "^8.21.0",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"lodash.find": "^4.6.0",
|
|
51
51
|
"match-semver": "^0.1.1",
|
|
52
52
|
"mocha-compat": "^3.5.5",
|
|
53
|
-
"node-install-release": "^0.3.
|
|
54
|
-
"node-version-utils": "^0.5.
|
|
53
|
+
"node-install-release": "^0.3.13",
|
|
54
|
+
"node-version-utils": "^0.5.5",
|
|
55
55
|
"prettier": "^2.7.1",
|
|
56
56
|
"rollup": "^2.77.2",
|
|
57
57
|
"rollup-plugin-babel": "^4.4.0",
|