diff options
author | Brett Bim <bbim@onetechnologies.net> | 2014-01-02 11:36:01 -0600 |
---|---|---|
committer | Brett Bim <bbim@onetechnologies.net> | 2014-01-02 11:36:01 -0600 |
commit | 70b27bcef6648e563c8252ea3b68af50dc1afb9c (patch) | |
tree | 74052541fe4313a88af7422b3ede63a7e376f544 /tasks/parser.js | |
parent | 0c6829f8af189622afd726bb72c195b5323bd6f9 (diff) | |
download | handlebars.js-70b27bcef6648e563c8252ea3b68af50dc1afb9c.zip handlebars.js-70b27bcef6648e563c8252ea3b68af50dc1afb9c.tar.gz handlebars.js-70b27bcef6648e563c8252ea3b68af50dc1afb9c.tar.bz2 |
Fix for issue #673 - Parser task did not execute correctly on windows environments because of forward/backward slash issues
Diffstat (limited to 'tasks/parser.js')
-rw-r--r-- | tasks/parser.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tasks/parser.js b/tasks/parser.js index f6a72c6..47533ce 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); |