diff --git a/lib/common.js b/lib/common.js index ba192cd..a94ae7e 100644 --- a/lib/common.js +++ b/lib/common.js @@ -834,8 +834,7 @@ function execPlus(args, cb) { + '\tstdout:\n%s\n' + '\tstderr:\n%s', cmd, err.code, stdout.trim(), stderr.trim()); - cb(new errors.InternalError({message: msg, cause: err}), - stdout, stderr); + cb(new errors.InternalError(err, msg), stdout, stderr); } else { cb(null, stdout, stderr); } diff --git a/lib/do_profile/profilecommon.js b/lib/do_profile/profilecommon.js index 13c4df7..4d44b82 100644 --- a/lib/do_profile/profilecommon.js +++ b/lib/do_profile/profilecommon.js @@ -313,7 +313,7 @@ function profileDockerSetup(opts, cb) { return; } common.execPlus({ - cmd: arg.dockerPath + ' --version', + cmd: format('"%s" --version', arg.dockerPath), log: log }, function (err, stdout, stderr) { if (err) {