Browse Source

Pretty error message messes up if readFileSync in main module fails.

TODO test/message test for this.
v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
180dfca03f
  1. 9
      src/node.js

9
src/node.js

@ -379,16 +379,7 @@
exports.runMain = function() {
// Load the main module--the command line argument.
process.mainModule = new Module('.');
try {
process.mainModule.load(process.argv[1]);
} catch (e) {
if (e.errno == lazyConstants().ENOENT) {
console.error("Cannot load '%s'", process.argv[1]);
process.exit(1);
} else {
throw e;
}
}
};
// bootstrap repl

Loading…
Cancel
Save