cross-spawn-cb 0.6.9 → 0.6.12

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 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 + '/spawnCallback.js'; // eslint-disable-line n/no-path-concat
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) {
@@ -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) {
@@ -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.9",
3
+ "version": "0.6.12",
4
4
  "description": "Cross spawn with a completion callback",
5
5
  "keywords": [
6
6
  "cross-spawn",
@@ -29,7 +29,7 @@
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.5",
32
+ "function-exec-sync": "^0.2.8",
33
33
  "next-tick": "^1.1.0",
34
34
  "once": "^1.4.0"
35
35
  },
@@ -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.10",
54
- "node-version-utils": "^0.5.4",
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",