cross-spawn-cb 0.6.13 → 0.6.15

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.
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ module.exports = {
3
+ spawnKeys: [
4
+ "pid",
5
+ "status",
6
+ "signal",
7
+ "stdout",
8
+ "stderr",
9
+ "output"
10
+ ]
11
+ };
12
+
13
+ if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
14
+ Object.defineProperty(exports.default, '__esModule', { value: true });
15
+ for (var key in exports) exports.default[key] = exports[key];
16
+ module.exports = exports.default;
17
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["constants.js"],"sourcesContent":["module.exports = {\n spawnKeys: ['pid', 'status', 'signal', 'stdout', 'stderr', 'output'],\n};\n"],"names":["module","exports","spawnKeys"],"mappings":";AAAAA,OAAOC,OAAO,GAAG;IACfC,WAAW;QAAC;QAAO;QAAU;QAAU;QAAU;QAAU;KAAS;AACtE"}
@@ -0,0 +1,570 @@
1
+ "use strict";
2
+ function _typeof(obj) {
3
+ "@babel/helpers - typeof";
4
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function _typeof(obj) {
5
+ return typeof obj;
6
+ } : function(obj) {
7
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
8
+ }, _typeof(obj);
9
+ }
10
+ Object.defineProperty(exports, "__esModule", {
11
+ value: true
12
+ });
13
+ var require$$0$2 = require("child_process");
14
+ var require$$0$1 = require("path");
15
+ var require$$0 = require("fs");
16
+ var require$$5 = require("semver");
17
+ function _interopDefaultLegacy(e) {
18
+ return e && _typeof(e) === "object" && "default" in e ? e : {
19
+ "default": e
20
+ };
21
+ }
22
+ var require$$0__default$2 = /*#__PURE__*/ _interopDefaultLegacy(require$$0$2);
23
+ var require$$0__default$1 = /*#__PURE__*/ _interopDefaultLegacy(require$$0$1);
24
+ var require$$0__default = /*#__PURE__*/ _interopDefaultLegacy(require$$0);
25
+ var require$$5__default = /*#__PURE__*/ _interopDefaultLegacy(require$$5);
26
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
27
+ var crossSpawn = {
28
+ exports: {}
29
+ };
30
+ /**
31
+ * Tries to execute a function and discards any error that occurs.
32
+ * @param {Function} fn - Function that might or might not throw an error.
33
+ * @returns {?*} Return-value of the function when no error occurred.
34
+ */ var src = function src(fn) {
35
+ try {
36
+ return fn();
37
+ } catch (e) {}
38
+ };
39
+ var windows;
40
+ var hasRequiredWindows;
41
+ function requireWindows() {
42
+ if (hasRequiredWindows) return windows;
43
+ hasRequiredWindows = 1;
44
+ windows = isexe;
45
+ isexe.sync = sync;
46
+ var fs = require$$0__default["default"];
47
+ function checkPathExt(path, options) {
48
+ var pathext = options.pathExt !== undefined ? options.pathExt : process.env.PATHEXT;
49
+ if (!pathext) {
50
+ return true;
51
+ }
52
+ pathext = pathext.split(";");
53
+ if (pathext.indexOf("") !== -1) {
54
+ return true;
55
+ }
56
+ for(var i = 0; i < pathext.length; i++){
57
+ var p = pathext[i].toLowerCase();
58
+ if (p && path.substr(-p.length).toLowerCase() === p) {
59
+ return true;
60
+ }
61
+ }
62
+ return false;
63
+ }
64
+ function checkStat(stat, path, options) {
65
+ if (!stat.isSymbolicLink() && !stat.isFile()) {
66
+ return false;
67
+ }
68
+ return checkPathExt(path, options);
69
+ }
70
+ function isexe(path, options, cb) {
71
+ fs.stat(path, function(er, stat) {
72
+ cb(er, er ? false : checkStat(stat, path, options));
73
+ });
74
+ }
75
+ function sync(path, options) {
76
+ return checkStat(fs.statSync(path), path, options);
77
+ }
78
+ return windows;
79
+ }
80
+ var mode;
81
+ var hasRequiredMode;
82
+ function requireMode() {
83
+ if (hasRequiredMode) return mode;
84
+ hasRequiredMode = 1;
85
+ mode = isexe;
86
+ isexe.sync = sync;
87
+ var fs = require$$0__default["default"];
88
+ function isexe(path, options, cb) {
89
+ fs.stat(path, function(er, stat) {
90
+ cb(er, er ? false : checkStat(stat, options));
91
+ });
92
+ }
93
+ function sync(path, options) {
94
+ return checkStat(fs.statSync(path), options);
95
+ }
96
+ function checkStat(stat, options) {
97
+ return stat.isFile() && checkMode(stat, options);
98
+ }
99
+ function checkMode(stat, options) {
100
+ var mod = stat.mode;
101
+ var uid = stat.uid;
102
+ var gid = stat.gid;
103
+ var myUid = options.uid !== undefined ? options.uid : process.getuid && process.getuid();
104
+ var myGid = options.gid !== undefined ? options.gid : process.getgid && process.getgid();
105
+ var u = parseInt("100", 8);
106
+ var g = parseInt("010", 8);
107
+ var o = parseInt("001", 8);
108
+ var ug = u | g;
109
+ var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
110
+ return ret;
111
+ }
112
+ return mode;
113
+ }
114
+ var core;
115
+ if (process.platform === "win32" || commonjsGlobal.TESTING_WINDOWS) {
116
+ core = requireWindows();
117
+ } else {
118
+ core = requireMode();
119
+ }
120
+ var isexe_1 = isexe$1;
121
+ isexe$1.sync = sync$1;
122
+ function isexe$1(path, options, cb) {
123
+ if (typeof options === "function") {
124
+ cb = options;
125
+ options = {};
126
+ }
127
+ if (!cb) {
128
+ if (typeof Promise !== "function") {
129
+ throw new TypeError("callback not provided");
130
+ }
131
+ return new Promise(function(resolve, reject) {
132
+ isexe$1(path, options || {}, function(er, is) {
133
+ if (er) {
134
+ reject(er);
135
+ } else {
136
+ resolve(is);
137
+ }
138
+ });
139
+ });
140
+ }
141
+ core(path, options || {}, function(er, is) {
142
+ // ignore EACCES because that just means we aren't allowed to run it
143
+ if (er) {
144
+ if (er.code === "EACCES" || options && options.ignoreErrors) {
145
+ er = null;
146
+ is = false;
147
+ }
148
+ }
149
+ cb(er, is);
150
+ });
151
+ }
152
+ function sync$1(path, options) {
153
+ // my kingdom for a filtered catch
154
+ try {
155
+ return core.sync(path, options || {});
156
+ } catch (er) {
157
+ if (options && options.ignoreErrors || er.code === "EACCES") {
158
+ return false;
159
+ } else {
160
+ throw er;
161
+ }
162
+ }
163
+ }
164
+ var which_1 = which$1;
165
+ which$1.sync = whichSync;
166
+ var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
167
+ var path$2 = require$$0__default$1["default"];
168
+ var COLON = isWindows ? ";" : ":";
169
+ var isexe = isexe_1;
170
+ function getNotFoundError(cmd) {
171
+ var er = new Error("not found: " + cmd);
172
+ er.code = "ENOENT";
173
+ return er;
174
+ }
175
+ function getPathInfo(cmd, opt) {
176
+ var colon = opt.colon || COLON;
177
+ var pathEnv = opt.path || process.env.PATH || "";
178
+ var pathExt = [
179
+ ""
180
+ ];
181
+ pathEnv = pathEnv.split(colon);
182
+ var pathExtExe = "";
183
+ if (isWindows) {
184
+ pathEnv.unshift(process.cwd());
185
+ pathExtExe = opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM";
186
+ pathExt = pathExtExe.split(colon); // Always test the cmd itself first. isexe will check to make sure
187
+ // it's found in the pathExt set.
188
+ if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") pathExt.unshift("");
189
+ } // If it has a slash, then we don't bother searching the pathenv.
190
+ // just check the file itself, and that's it.
191
+ if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) pathEnv = [
192
+ ""
193
+ ];
194
+ return {
195
+ env: pathEnv,
196
+ ext: pathExt,
197
+ extExe: pathExtExe
198
+ };
199
+ }
200
+ function which$1(cmd, opt, cb) {
201
+ if (typeof opt === "function") {
202
+ cb = opt;
203
+ opt = {};
204
+ }
205
+ var info = getPathInfo(cmd, opt);
206
+ var pathEnv = info.env;
207
+ var pathExt = info.ext;
208
+ var pathExtExe = info.extExe;
209
+ var found = [];
210
+ (function F(i, l) {
211
+ if (i === l) {
212
+ if (opt.all && found.length) return cb(null, found);
213
+ else return cb(getNotFoundError(cmd));
214
+ }
215
+ var pathPart = pathEnv[i];
216
+ if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') pathPart = pathPart.slice(1, -1);
217
+ var p = path$2.join(pathPart, cmd);
218
+ if (!pathPart && /^\.[\\\/]/.test(cmd)) {
219
+ p = cmd.slice(0, 2) + p;
220
+ }
221
+ (function E(ii, ll) {
222
+ if (ii === ll) return F(i + 1, l);
223
+ var ext = pathExt[ii];
224
+ isexe(p + ext, {
225
+ pathExt: pathExtExe
226
+ }, function(er, is) {
227
+ if (!er && is) {
228
+ if (opt.all) found.push(p + ext);
229
+ else return cb(null, p + ext);
230
+ }
231
+ return E(ii + 1, ll);
232
+ });
233
+ })(0, pathExt.length);
234
+ })(0, pathEnv.length);
235
+ }
236
+ function whichSync(cmd, opt) {
237
+ opt = opt || {};
238
+ var info = getPathInfo(cmd, opt);
239
+ var pathEnv = info.env;
240
+ var pathExt = info.ext;
241
+ var pathExtExe = info.extExe;
242
+ var found = [];
243
+ for(var i = 0, l = pathEnv.length; i < l; i++){
244
+ var pathPart = pathEnv[i];
245
+ if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') pathPart = pathPart.slice(1, -1);
246
+ var p = path$2.join(pathPart, cmd);
247
+ if (!pathPart && /^\.[\\\/]/.test(cmd)) {
248
+ p = cmd.slice(0, 2) + p;
249
+ }
250
+ for(var j = 0, ll = pathExt.length; j < ll; j++){
251
+ var cur = p + pathExt[j];
252
+ var is;
253
+ try {
254
+ is = isexe.sync(cur, {
255
+ pathExt: pathExtExe
256
+ });
257
+ if (is) {
258
+ if (opt.all) found.push(cur);
259
+ else return cur;
260
+ }
261
+ } catch (ex) {}
262
+ }
263
+ }
264
+ if (opt.all && found.length) return found;
265
+ if (opt.nothrow) return null;
266
+ throw getNotFoundError(cmd);
267
+ }
268
+ var pathKey$1 = function pathKey$1(opts) {
269
+ opts = opts || {};
270
+ var env = opts.env || process.env;
271
+ var platform = opts.platform || process.platform;
272
+ if (platform !== "win32") {
273
+ return "PATH";
274
+ }
275
+ return Object.keys(env).find(function(x) {
276
+ return x.toUpperCase() === "PATH";
277
+ }) || "Path";
278
+ };
279
+ var path$1 = require$$0__default$1["default"];
280
+ var which = which_1;
281
+ var pathKey = pathKey$1();
282
+ function resolveCommandAttempt(parsed, withoutPathExt) {
283
+ var cwd = process.cwd();
284
+ var hasCustomCwd = parsed.options.cwd != null; // If a custom `cwd` was specified, we need to change the process cwd
285
+ // because `which` will do stat calls but does not support a custom cwd
286
+ if (hasCustomCwd) {
287
+ try {
288
+ process.chdir(parsed.options.cwd);
289
+ } catch (err) {
290
+ /* Empty */ }
291
+ }
292
+ var resolved;
293
+ try {
294
+ resolved = which.sync(parsed.command, {
295
+ path: (parsed.options.env || process.env)[pathKey],
296
+ pathExt: withoutPathExt ? path$1.delimiter : undefined
297
+ });
298
+ } catch (e) {
299
+ /* Empty */ } finally{
300
+ process.chdir(cwd);
301
+ } // If we successfully resolved, ensure that an absolute path is returned
302
+ // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it
303
+ if (resolved) {
304
+ resolved = path$1.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
305
+ }
306
+ return resolved;
307
+ }
308
+ function resolveCommand$1(parsed) {
309
+ return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
310
+ }
311
+ var resolveCommand_1 = resolveCommand$1;
312
+ var _escape = {}; // See http://www.robvanderwoude.com/escapechars.php
313
+ var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
314
+ function escapeCommand(arg) {
315
+ // Escape meta chars
316
+ arg = arg.replace(metaCharsRegExp, "^$1");
317
+ return arg;
318
+ }
319
+ function escapeArgument(arg, doubleEscapeMetaChars) {
320
+ // Convert to string
321
+ arg = "".concat(arg); // Algorithm below is based on https://qntm.org/cmd
322
+ // Sequence of backslashes followed by a double quote:
323
+ // double up all the backslashes and escape the double quote
324
+ arg = arg.replace(/(\\*)"/g, '$1$1\\"'); // Sequence of backslashes followed by the end of the string
325
+ // (which will become a double quote later):
326
+ // double up all the backslashes
327
+ arg = arg.replace(/(\\*)$/, "$1$1"); // All other backslashes occur literally
328
+ // Quote the whole thing:
329
+ arg = '"'.concat(arg, '"'); // Escape meta chars
330
+ arg = arg.replace(metaCharsRegExp, "^$1"); // Double escape meta chars if necessary
331
+ if (doubleEscapeMetaChars) {
332
+ arg = arg.replace(metaCharsRegExp, "^$1");
333
+ }
334
+ return arg;
335
+ }
336
+ _escape.command = escapeCommand;
337
+ _escape.argument = escapeArgument;
338
+ var shebangRegex$1 = /^#!.*/;
339
+ var shebangRegex = shebangRegex$1;
340
+ var shebangCommand$1 = function shebangCommand$1(str) {
341
+ var match = str.match(shebangRegex);
342
+ if (!match) {
343
+ return null;
344
+ }
345
+ var arr = match[0].replace(/#! ?/, "").split(" ");
346
+ var bin = arr[0].split("/").pop();
347
+ var arg = arr[1];
348
+ return bin === "env" ? arg : bin + (arg ? " " + arg : "");
349
+ };
350
+ var fs = require$$0__default["default"];
351
+ var shebangCommand = shebangCommand$1;
352
+ function readShebang$1(command) {
353
+ // Read the first 150 bytes from the file
354
+ var size = 150;
355
+ var buffer;
356
+ if (Buffer.alloc) {
357
+ // Node.js v4.5+ / v5.10+
358
+ buffer = Buffer.alloc(size);
359
+ } else {
360
+ // Old Node.js API
361
+ buffer = new Buffer(size);
362
+ buffer.fill(0); // zero-fill
363
+ }
364
+ var fd;
365
+ try {
366
+ fd = fs.openSync(command, "r");
367
+ fs.readSync(fd, buffer, 0, size, 0);
368
+ fs.closeSync(fd);
369
+ } catch (e) {
370
+ /* Empty */ } // Attempt to extract shebang (null is returned if not a shebang)
371
+ return shebangCommand(buffer.toString());
372
+ }
373
+ var readShebang_1 = readShebang$1;
374
+ var path = require$$0__default$1["default"];
375
+ var niceTry = src;
376
+ var resolveCommand = resolveCommand_1;
377
+ var escape = _escape;
378
+ var readShebang = readShebang_1;
379
+ var semver = require$$5__default["default"];
380
+ var isWin$1 = process.platform === "win32";
381
+ var isExecutableRegExp = /\.(?:com|exe)$/i;
382
+ var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; // `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0
383
+ var supportsShellOption = niceTry(function() {
384
+ return semver.satisfies(process.version, "^4.8.0 || ^5.7.0 || >= 6.0.0", true);
385
+ }) || false;
386
+ function detectShebang(parsed) {
387
+ parsed.file = resolveCommand(parsed);
388
+ var shebang = parsed.file && readShebang(parsed.file);
389
+ if (shebang) {
390
+ parsed.args.unshift(parsed.file);
391
+ parsed.command = shebang;
392
+ return resolveCommand(parsed);
393
+ }
394
+ return parsed.file;
395
+ }
396
+ var NODES = [
397
+ "node",
398
+ "node.exe",
399
+ "node.cmd"
400
+ ];
401
+ function parseNonShell(parsed) {
402
+ if (!isWin$1) {
403
+ return parsed;
404
+ } // Detect & add support for shebangs
405
+ var commandFile = detectShebang(parsed); // We don't need a shell if the command filename is an executable
406
+ var needsShell = !isExecutableRegExp.test(commandFile); // If a shell is required, use cmd.exe and take care of escaping everything correctly
407
+ // Note that `forceShell` is an hidden option used only in tests
408
+ // KM: force node to use the shell
409
+ if (!needsShell && NODES.indexOf(path.basename(commandFile).toLowerCase()) >= 0) needsShell = true;
410
+ if (parsed.options.forceShell || needsShell) {
411
+ // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`
412
+ // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument
413
+ // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,
414
+ // we need to double escape them
415
+ var needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar)
416
+ // This is necessary otherwise it will always fail with ENOENT in those cases
417
+ parsed.command = path.normalize(parsed.command); // Escape command & arguments
418
+ parsed.command = escape.command(parsed.command);
419
+ parsed.args = parsed.args.map(function(arg) {
420
+ return escape.argument(arg, needsDoubleEscapeMetaChars);
421
+ });
422
+ var shellCommand = [
423
+ parsed.command
424
+ ].concat(parsed.args).join(" ");
425
+ parsed.args = [
426
+ "/d",
427
+ "/s",
428
+ "/c",
429
+ '"'.concat(shellCommand, '"')
430
+ ];
431
+ parsed.command = process.env.comspec || "cmd.exe";
432
+ parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
433
+ }
434
+ return parsed;
435
+ }
436
+ function parseShell(parsed) {
437
+ // If node supports the shell option, there's no need to mimic its behavior
438
+ if (supportsShellOption) {
439
+ return parsed;
440
+ } // Mimic node shell option
441
+ // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335
442
+ var shellCommand = [
443
+ parsed.command
444
+ ].concat(parsed.args).join(" ");
445
+ if (isWin$1) {
446
+ parsed.command = typeof parsed.options.shell === "string" ? parsed.options.shell : process.env.comspec || "cmd.exe";
447
+ parsed.args = [
448
+ "/d",
449
+ "/s",
450
+ "/c",
451
+ '"'.concat(shellCommand, '"')
452
+ ];
453
+ parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
454
+ } else {
455
+ if (typeof parsed.options.shell === "string") {
456
+ parsed.command = parsed.options.shell;
457
+ } else if (process.platform === "android") {
458
+ parsed.command = "/system/bin/sh";
459
+ } else {
460
+ parsed.command = "/bin/sh";
461
+ }
462
+ parsed.args = [
463
+ "-c",
464
+ shellCommand
465
+ ];
466
+ }
467
+ return parsed;
468
+ }
469
+ function parse$1(command, args, options) {
470
+ // Normalize arguments, similar to nodejs
471
+ if (args && !Array.isArray(args)) {
472
+ options = args;
473
+ args = null;
474
+ }
475
+ args = args ? args.slice(0) : []; // Clone array to avoid changing the original
476
+ options = Object.assign({}, options); // Clone object to avoid changing the original
477
+ // Build our parsed object
478
+ var parsed = {
479
+ command: command,
480
+ args: args,
481
+ options: options,
482
+ file: undefined,
483
+ original: {
484
+ command: command,
485
+ args: args
486
+ }
487
+ }; // Delegate further parsing to shell or non-shell
488
+ return options.shell ? parseShell(parsed) : parseNonShell(parsed);
489
+ }
490
+ var parse_1 = parse$1;
491
+ var isWin = process.platform === "win32";
492
+ function notFoundError(original, syscall) {
493
+ return Object.assign(new Error("".concat(syscall, " ").concat(original.command, " ENOENT")), {
494
+ code: "ENOENT",
495
+ errno: "ENOENT",
496
+ syscall: "".concat(syscall, " ").concat(original.command),
497
+ path: original.command,
498
+ spawnargs: original.args
499
+ });
500
+ }
501
+ function hookChildProcess(cp, parsed) {
502
+ if (!isWin) {
503
+ return;
504
+ }
505
+ var originalEmit = cp.emit;
506
+ cp.emit = function(name, arg1) {
507
+ // If emitting "exit" event and exit code is 1, we need to check if
508
+ // the command exists and emit an "error" instead
509
+ // See https://github.com/IndigoUnited/node-cross-spawn/issues/16
510
+ if (name === "exit") {
511
+ var err = verifyENOENT(arg1, parsed);
512
+ if (err) {
513
+ return originalEmit.call(cp, "error", err);
514
+ }
515
+ }
516
+ return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
517
+ };
518
+ }
519
+ function verifyENOENT(status, parsed) {
520
+ if (isWin && status === 1 && !parsed.file) {
521
+ return notFoundError(parsed.original, "spawn");
522
+ }
523
+ return null;
524
+ }
525
+ function verifyENOENTSync(status, parsed) {
526
+ if (isWin && status === 1 && !parsed.file) {
527
+ return notFoundError(parsed.original, "spawnSync");
528
+ }
529
+ return null;
530
+ }
531
+ var enoent$1 = {
532
+ hookChildProcess: hookChildProcess,
533
+ verifyENOENT: verifyENOENT,
534
+ verifyENOENTSync: verifyENOENTSync,
535
+ notFoundError: notFoundError
536
+ };
537
+ var cp = require$$0__default$2["default"];
538
+ var parse = parse_1;
539
+ var enoent = enoent$1;
540
+ function spawn(command, args, options) {
541
+ // Parse the arguments
542
+ var parsed = parse(command, args, options); // Spawn the child process
543
+ var spawned = cp.spawn(parsed.command, parsed.args, parsed.options); // Hook into child process "exit" event to emit an error if the command
544
+ // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
545
+ enoent.hookChildProcess(spawned, parsed);
546
+ return spawned;
547
+ }
548
+ function spawnSync(command, args, options) {
549
+ // Parse the arguments
550
+ var parsed = parse(command, args, options); // Spawn the child process
551
+ var result = cp.spawnSync(parsed.command, parsed.args, parsed.options); // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
552
+ result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
553
+ return result;
554
+ }
555
+ crossSpawn.exports = spawn;
556
+ var spawn_1 = crossSpawn.exports.spawn = spawn;
557
+ var sync = crossSpawn.exports.sync = spawnSync;
558
+ var _parse = crossSpawn.exports._parse = parse;
559
+ var _enoent = crossSpawn.exports._enoent = enoent;
560
+ exports._enoent = _enoent;
561
+ exports._parse = _parse;
562
+ exports["default"] = crossSpawn.exports;
563
+ exports.spawn = spawn_1;
564
+ exports.sync = sync;
565
+
566
+ if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
567
+ Object.defineProperty(exports.default, '__esModule', { value: true });
568
+ for (var key in exports) exports.default[key] = exports[key];
569
+ module.exports = exports.default;
570
+ }