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