From 246810e342f74c4035917a536c4d522584453325 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Wed, 26 Oct 2016 11:11:27 -0700 Subject: [PATCH] TOOLS-1587 'triton profile docker-setup' fails when path to 'docker' has spaces Reviewed by: Julien Gilli Reviewed by: Orlando Vazquez Approved by: Orlando Vazquez --- lib/common.js | 3 +-- lib/do_profile/profilecommon.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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) {