From 487412fa2217945bc762ce2afc61a8094eb17ccf Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Wed, 10 Feb 2010 18:17:41 -0800 Subject: [PATCH] objj repl respects -I args. Closes gh-235 --- Objective-J/CommonJS/lib/objective-j.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Objective-J/CommonJS/lib/objective-j.js b/Objective-J/CommonJS/lib/objective-j.js index e0ecf4477..0c853c0a1 100644 --- a/Objective-J/CommonJS/lib/objective-j.js +++ b/Objective-J/CommonJS/lib/objective-j.js @@ -66,7 +66,7 @@ with (window) // runs the objj repl or file provided in args exports.run = function(args) { - if (args && args.length > 1) + if (args) { // we expect args to be in the format: // 1) "objj" path @@ -79,7 +79,10 @@ exports.run = function(args) while (argv.length && argv[0].indexOf('-I') === 0) OBJJ_INCLUDE_PATHS.unshift.apply(OBJJ_INCLUDE_PATHS, argv.shift().substr(2).split(':')); + } + if (argv && argv.length > 1) + { var arg0 = argv.shift(); var mainFilePath = FILE.canonical(arg0);