From e46a832ded249b44ea94523a796c4e2847a104ab Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 8 Oct 2009 01:30:26 +0200 Subject: [PATCH] Use /bin/sh from exec() --- lib/utils.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index d33d504e17..f85bb15fdb 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -44,15 +44,7 @@ exports.p = function (x) { }; exports.exec = function (command) { - // TODO TODO TODO - // The following line needs to be replaced with proper command line - // parsing. at the moment quoted strings will not be picked up as a single - // argument. - var args = command.split(/\s+/); - - var file = args.shift(); - - var child = node.createChildProcess(file, args); + var child = node.createChildProcess("/bin/sh", ["-c", command]); var stdout = ""; var stderr = ""; var promise = new node.Promise();