diff --git a/index.js b/index.js index 34b2dd0..a754a38 100644 --- a/index.js +++ b/index.js @@ -101,7 +101,9 @@ module.exports = function (options) { if (!(tasks instanceof Array)) throw new Error('Expected task name or array but found: ' + tasks) var gulpPath = path.join(process.cwd(), 'node_modules/.bin/') var gulpCmd = path.join(gulpPath, process.platform === 'win32' ? 'gulp.cmd' : 'gulp') - cp.spawnSync(gulpCmd, tasks, { stdio: [0, 1, 2] }); + var options = { stdio: [0, 1, 2] } + if (process.platform === 'win32') options.shell = true + cp.spawnSync(gulpCmd, tasks, options) } }