PHP 8.2.30
Preview: index.js Size: 1.16 KB
//opt/alt/alt-nodejs20/root/lib/node_modules/npm/node_modules/cross-spawn/index.js

'use strict';

const cp = require('child_process');
const parse = require('./lib/parse');
const enoent = require('./lib/enoent');

function spawn(command, args, options) {
    // Parse the arguments
    const parsed = parse(command, args, options);

    // Spawn the child process
    const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);

    // Hook into child process "exit" event to emit an error if the command
    // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
    enoent.hookChildProcess(spawned, parsed);

    return spawned;
}

function spawnSync(command, args, options) {
    // Parse the arguments
    const parsed = parse(command, args, options);

    // Spawn the child process
    const 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
    result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);

    return result;
}

module.exports = spawn;
module.exports.spawn = spawn;
module.exports.sync = spawnSync;

module.exports._parse = parse;
module.exports._enoent = enoent;

Directory Contents

Dirs: 2 × Files: 3

Name Size Perms Modified Actions
lib DIR
- drwxr-xr-x 2026-03-14 07:02:08
Edit Download
- drwxr-xr-x 2026-02-23 03:44:48
Edit Download
1.16 KB lrw-r--r-- 2026-02-23 03:24:43
Edit Download
1.08 KB lrw-r--r-- 2026-02-23 03:24:43
Edit Download
1.62 KB lrw-r--r-- 2026-02-23 03:24:43
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).