1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

s/process.mainModule/require.main

This commit is contained in:
Jeremy Ashkenas 2011-05-01 13:45:47 -04:00
parent 09712603c4
commit 08294dc4d6
2 changed files with 2 additions and 2 deletions

View file

@ -51,7 +51,7 @@
}
process.ARGV = process.argv = process.argv.slice(0, 2).concat(opts.literals);
process.argv[0] = 'coffee';
process.execPath = process.mainModule.filename;
process.execPath = require.main.filename;
return compileScripts();
};
compileScripts = function() {

View file

@ -67,7 +67,7 @@ exports.run = ->
opts.literals = sources.splice(1).concat opts.literals
process.ARGV = process.argv = process.argv.slice(0, 2).concat opts.literals
process.argv[0] = 'coffee'
process.execPath = process.mainModule.filename
process.execPath = require.main.filename
compileScripts()
# Asynchronously read in each CoffeeScript in a list of source files and