mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Setting process.argv[0] to 'coffee' in the REPL (aesthetic)
This commit is contained in:
@@ -66,6 +66,7 @@
|
||||
};
|
||||
exports.eval = function(code, options) {
|
||||
var __dirname, __filename;
|
||||
process.argv[0] = 'coffee';
|
||||
__filename = module.filename = process.argv[1] = options.filename;
|
||||
__dirname = path.dirname(__filename);
|
||||
return eval(compile(code, options));
|
||||
|
||||
@@ -82,6 +82,7 @@ exports.run = (code, options) ->
|
||||
# Compile and evaluate a string of CoffeeScript (in a Node.js-like environment).
|
||||
# The CoffeeScript REPL uses this to run the input.
|
||||
exports.eval = (code, options) ->
|
||||
process.argv[0] = 'coffee'
|
||||
__filename = module.filename = process.argv[1] = options.filename
|
||||
__dirname = path.dirname __filename
|
||||
eval compile code, options
|
||||
|
||||
Reference in New Issue
Block a user