Skip to content

Commit

Permalink
fixes #142; command: removed -n for --nodejs
Browse files Browse the repository at this point in the history
  • Loading branch information
satyr committed Jun 24, 2012
1 parent a4b7a7e commit 87cb61c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/command.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ $args = (o = require('./optparse')({
tokens: 'print the tokens the rewriter produces', tokens: 'print the tokens the rewriter produces',
ast: 'print the syntax tree the parser produces', ast: 'print the syntax tree the parser produces',
json: 'print/compile as JSON', json: 'print/compile as JSON',
nodejs: ['pass options through to the "node" binary', 'ARGS+'], nodejs: ['pass options through to the "node" binary', 'ARGS+', ''],
version: 'display version', version: 'display version',
help: 'display this' help: 'display this'
})).$args; })).$args;
Expand Down Expand Up @@ -360,7 +360,7 @@ function forkNode(){
args = argv.slice(1); args = argv.slice(1);
i = 0; i = 0;
while (that = args[++i]) { while (that = args[++i]) {
if (that === '-n' || that === '--nodejs') { if (that === '--nodejs') {
args.splice(i--, 2); args.splice(i--, 2);
} }
} }
Expand Down
4 changes: 2 additions & 2 deletions src/command.co
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ global import
tokens : 'print the tokens the rewriter produces' tokens : 'print the tokens the rewriter produces'
ast : 'print the syntax tree the parser produces' ast : 'print the syntax tree the parser produces'
json : 'print/compile as JSON' json : 'print/compile as JSON'
nodejs :['pass options through to the "node" binary' \ARGS+] nodejs :['pass options through to the "node" binary' \ARGS+ '']
version : 'display version' version : 'display version'
help : 'display this' help : 'display this'


Expand Down Expand Up @@ -237,7 +237,7 @@ default
# to it, preserving the other options. # to it, preserving the other options.
!function forkNode !function forkNode
args = argv.slice 1; i = 0 args = argv.slice 1; i = 0
args.splice i-- 2 if that of <[ -n --nodejs ]> while args[++i] args.splice i-- 2 if that is \--nodejs while args[++i]
require(\child_process)spawn do require(\child_process)spawn do
process.execPath process.execPath
o.nodejs.join(' ')trim!split(/\s+/)concat args o.nodejs.join(' ')trim!split(/\s+/)concat args
Expand Down

0 comments on commit 87cb61c

Please sign in to comment.