make shell.exec options non-optional

This commit is contained in:
Girish Ramakrishnan
2017-09-09 19:48:05 -07:00
parent 300d3dd545
commit 547a80f17b
3 changed files with 5 additions and 11 deletions

View File

@@ -33,13 +33,8 @@ function exec(tag, file, args, options, callback) {
assert.strictEqual(typeof tag, 'string');
assert.strictEqual(typeof file, 'string');
assert(util.isArray(args));
if (typeof options === 'function') {
callback = options;
options = { };
}
assert.strictEqual(typeof options, 'object');
assert.strictEqual(typeof callback, 'function');
callback = once(callback); // exit may or may not be called after an 'error'