diff --git a/package.json b/package.json index 47aafd4..3085c3e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "devDependencies": { "grunt": "^1.0.1", "grunt-cli": "^1.2.0", - "xo": "*" + "xo": "0.20.3" }, "peerDependencies": { "grunt": ">=0.4.0" diff --git a/tasks/shell.js b/tasks/shell.js index a175369..0dc03eb 100644 --- a/tasks/shell.js +++ b/tasks/shell.js @@ -20,13 +20,15 @@ module.exports = grunt => { } }); - let cmd = typeof this.data === 'string' ? this.data : this.data.command; + let cmd = typeof this.data === 'string' || typeof this.data === 'function' ? + this.data : + this.data.command; if (cmd === undefined) { throw new Error('`command` required'); } - // increase max buffer + // Increase max buffer opts.execOptions = Object.assign({}, opts.execOptions); opts.execOptions.maxBuffer = opts.execOptions.maxBuffer || TEN_MEGABYTES;