From 9f56c9249749271cded933b67bcd9f1aa167675a Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Sat, 11 Dec 2010 13:50:59 -0500 Subject: [PATCH] Issue #853. Normalizing values of ARGV and argv with Node.js --- lib/command.js | 2 +- src/command.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/command.js b/lib/command.js index f3be6632..a59c9b38 100644 --- a/lib/command.js +++ b/lib/command.js @@ -52,7 +52,7 @@ if (opts.run) { flags = sources.splice(1).concat(flags); } - process.ARGV = process.argv = flags; + process.ARGV = process.argv = process.argv.slice(0, 2).concat(flags); return compileScripts(); }; compileScripts = function() { diff --git a/src/command.coffee b/src/command.coffee index 6034db64..fcf12882 100644 --- a/src/command.coffee +++ b/src/command.coffee @@ -73,7 +73,7 @@ exports.run = -> sources.pop() if opts.run flags = sources.splice(1).concat flags - process.ARGV = process.argv = flags + process.ARGV = process.argv = process.argv.slice(0, 2).concat flags compileScripts() # Asynchronously read in each CoffeeScript in a list of source files and