roll back to options.filename

This commit is contained in:
Hao-kang Den
2013-03-13 15:58:39 +08:00
parent 22595424a8
commit a8b65565dd

View File

@@ -105,7 +105,7 @@ exports.run = (code, options = {}) ->
mainModule.moduleCache and= {}
# Assign paths for node_modules loading
mainModule.paths = require('module')._nodeModulePaths path.dirname mainModule.filename
mainModule.paths = require('module')._nodeModulePaths path.dirname fs.realpathSync options.filename or '.'
# Compile.
if not helpers.isCoffee(mainModule.filename) or require.extensions