Promise
wrapper around require('child_process').spawn
that runs a process to completion with a given stdin
and collects stdout
, stderr
, and the exit code.
// Fix errors in a zip archive.
const { procExitCode, procStdout, procStderr } = await runExternalProcessAsync({
procExecutable: 'zip',
procArgs: ['-FF', zipTempPath, '--out', zipFixedTempPath],
procStdinString: 'y',
});