Use better logging for archiver spawn()

This commit is contained in:
Bryan Ashby 2018-11-14 21:24:15 -07:00
parent b48f3f3d42
commit e4cb93a17c
1 changed files with 6 additions and 2 deletions

View File

@ -222,7 +222,9 @@ module.exports = class ArchiveUtil {
try {
proc = pty.spawn(archiver.compress.cmd, args, this.getPtyOpts());
} catch(e) {
return cb(e);
return cb(Errors.ExternalProcess(
`Error spawning archiver process "${archiver.compress.cmd}" with args "${args.join(' ')}": ${e.message}`)
);
}
return this.spawnHandler(proc, 'Compression', cb);
@ -297,7 +299,9 @@ module.exports = class ArchiveUtil {
try {
proc = pty.spawn(archiver.list.cmd, args, this.getPtyOpts());
} catch(e) {
return cb(e);
return cb(Errors.ExternalProcess(
`Error spawning archiver process "${archiver.list.cmd}" with args "${args.join(' ')}": ${e.message}`)
);
}
let output = '';