From 01cd5476a001b53a1730ddbcbc89004c094e79af Mon Sep 17 00:00:00 2001 From: Stan Angeloff Date: Mon, 16 Aug 2010 17:36:55 +0300 Subject: [PATCH] '-r' should work with $NODE_PATH as well (where previously it was an absolute/relative path) --- 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 61edb05e..eb67b4d6 100644 --- a/lib/command.js +++ b/lib/command.js @@ -102,7 +102,7 @@ _e = o.require; for (_d = 0, _f = _e.length; _d < _f; _d++) { file = _e[_d]; - require(fs.realpathSync(file)); + require(helpers.starts(file, '.') ? fs.realpathSync(file) : file); } } try { diff --git a/src/command.coffee b/src/command.coffee index f9b48f1f..9de7fe0b 100644 --- a/src/command.coffee +++ b/src/command.coffee @@ -96,7 +96,7 @@ compileScript = (file, input, base) -> o = opts options = compileOptions file if o.require - require fs.realpathSync file for file in o.require + require(if helpers.starts(file, '.') then fs.realpathSync(file) else file) for file in o.require try t = task = {file, input, options} CoffeeScript.emit 'compile', task