Better error report from spawn() fail in extractTo()

This commit is contained in:
Bryan Ashby 2018-11-14 21:00:21 -07:00
parent 941e7d0a03
commit ea4fb090e2
1 changed files with 3 additions and 1 deletions

View File

@ -272,7 +272,9 @@ module.exports = class ArchiveUtil {
try {
proc = pty.spawn(archiver[action].cmd, args, this.getPtyOpts(extractPath));
} catch(e) {
return cb(e);
return cb(Errors.ExternalProcess(
`Error spawning archiver process "${archiver[action].cmd}" with args "${args.join(' ')}": ${e.message}`)
);
}
return this.spawnHandler(proc, (haveFileList ? 'Extraction' : 'Decompression'), cb);