Skip to content

Commit 772e59a

Browse files
committed
reset __dirname & __filename after script eval
1 parent ba205f0 commit 772e59a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/cljs/cljs/bootstrap_node.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ function nodeGlobalRequire(file) {
8585
global.__dirname = file.substring(0, file.lastIndexOf('/'));
8686
global.__filename = file;
8787
vm.runInThisContext(fs.readFileSync(file), file);
88+
global.__dirname = undefined;
89+
global.__filename = undefined;
8890
global.exports = _exports;
8991
global.module = _module;
9092
}

0 commit comments

Comments
 (0)