From 70b27bcef6648e563c8252ea3b68af50dc1afb9c Mon Sep 17 00:00:00 2001 From: Brett Bim Date: Thu, 2 Jan 2014 11:36:01 -0600 Subject: [PATCH] Fix for issue #673 - Parser task did not execute correctly on windows environments because of forward/backward slash issues --- tasks/parser.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/parser.js b/tasks/parser.js index f6a72c61..47533ced 100644 --- a/tasks/parser.js +++ b/tasks/parser.js @@ -4,7 +4,13 @@ module.exports = function(grunt) { grunt.registerTask('parser', 'Generate jison parser.', function() { var done = this.async(); - var child = childProcess.spawn('./node_modules/.bin/jison', ['-m', 'js', 'src/handlebars.yy', 'src/handlebars.l'], {stdio: 'inherit'}); + var cmd = './node_modules/.bin/jison'; + + if(process.platform === 'win32'){ + cmd = 'node_modules\\.bin\\jison.cmd'; + } + + var child = childProcess.spawn(cmd, ['-m', 'js', 'src/handlebars.yy', 'src/handlebars.l'], {stdio: 'inherit'}); child.on('exit', function(code) { if (code != 0) { grunt.fatal('Jison failure: ' + code);