mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
fix node v0.10 path
This commit is contained in:
@@ -105,7 +105,7 @@ exports.run = (code, options = {}) ->
|
||||
mainModule.moduleCache and= {}
|
||||
|
||||
# Assign paths for node_modules loading
|
||||
mainModule.paths = require('module')._nodeModulePaths path.dirname fs.realpathSync options.filename
|
||||
mainModule.paths = require('module')._nodeModulePaths path.dirname mainModule.filename
|
||||
|
||||
# Compile.
|
||||
if not helpers.isCoffee(mainModule.filename) or require.extensions
|
||||
@@ -277,4 +277,4 @@ formatSourcePosition = (frame, getSourceMapping) ->
|
||||
else if functionName
|
||||
"#{functionName} (#{fileLocation})"
|
||||
else
|
||||
fileLocation
|
||||
fileLocation
|
||||
|
||||
Reference in New Issue
Block a user