Use __filename for 'getExecutingFilePath'.

This commit is contained in:
Daniel Rosenwasser 2014-12-04 16:37:12 -08:00
parent 978ac26eff
commit c5510444d9
2 changed files with 4 additions and 3 deletions

View file

@ -25,6 +25,7 @@ declare var require: any;
declare var module: any;
declare var process: any;
declare var global: any;
declare var __filename: string;
var sys: System = (function () {
@ -224,10 +225,10 @@ var sys: System = (function () {
}
},
getExecutingFilePath() {
return process.mainModule.filename;
return __filename;
},
getCurrentDirectory() {
return (<any>process).cwd();
return process.cwd();
},
getMemoryUsage() {
if (global.gc) {

View file

@ -25,7 +25,7 @@
// this will work in the browser via browserify
var _chai: typeof chai = require('chai');
var assert: typeof _chai.assert = _chai.assert;
declare var __dirname: any; // Node-specific
declare var __dirname: string; // Node-specific
var global = <any>Function("return this").call(null);
module Utils {