shell: docker run needs shell
don't want to get into parsing quotes!
This commit is contained in:
@@ -50,12 +50,13 @@ async function execArgs(tag, file, args, options) {
|
||||
});
|
||||
}
|
||||
|
||||
// default encoding utf8, shell, handles input, full command
|
||||
// default encoding utf8, no shell, handles input, full command
|
||||
async function exec(tag, cmd, options) {
|
||||
assert.strictEqual(typeof tag, 'string');
|
||||
assert.strictEqual(typeof cmd, 'string');
|
||||
assert.strictEqual(typeof options, 'object');
|
||||
|
||||
cmd = options.shell ? cmd : cmd.replace(/\s+/g, ' '); // collapse spaces when not using shell. note: no more complexity like parsing quotes here!
|
||||
const [file, ...args] = cmd.split(' ');
|
||||
return await execArgs(tag, file, args, options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user