Use the right gulp executable on Windows
Paul O’Shannessy committed
Oct 12, 2015 at 10:01 UTC
227ba42f819c8f3da5b36c170d6317684dd411f5
1 file changed
+8
-1
Gruntfile.js
+8
-1
@@ -2,6 +2,12 @@
2
3
var assign = require('object-assign');
4
var path = require('path');
5
+var process = require('process');
6
+
7
+var GULP_EXE = 'gulp';
8
+if (process.platform === 'win32') {
9
+ GULP_EXE += '.cmd';
10
+}
11
12
module.exports = function(grunt) {
13
@@ -25,10 +31,11 @@ module.exports = function(grunt) {
31
grunt.config.set('compress', require('./grunt/config/compress'));
32
33
function spawnGulp(args, opts, done) {
34
+
35
grunt.util.spawn({
36
// This could be more flexible (require.resolve & lookup bin in package)
37
// but if it breaks we'll fix it then.
31
- cmd: path.join('node_modules', '.bin', 'gulp'),
38
+ cmd: path.join('node_modules', '.bin', GULP_EXE),
39
args: args,
40
opts: assign({stdio: 'inherit'}, opts),
41
}, function(err, result, code) {