Skip to content

Commit dcd5ea8

Browse files
committed
Fixes microsoft#54550: Define fs as original-fs only when running in Electron
1 parent 0738ae2 commit dcd5ea8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/bootstrap-amd.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ loader.config({
6969
nodeCachedDataDir: process.env['VSCODE_NODE_CACHED_DATA_DIR_' + process.pid]
7070
});
7171

72-
loader.define('fs', ['original-fs'], function (originalFS) { return originalFS; }); // replace the patched electron fs with the original node fs for all AMD code
72+
if (process.env['ELECTRON_RUN_AS_NODE'] || process.versions.electron) {
73+
// running in Electron
74+
loader.define('fs', ['original-fs'], function (originalFS) { return originalFS; }); // replace the patched electron fs with the original node fs for all AMD code
75+
}
7376

7477
if (nlsConfig.pseudo) {
7578
loader(['vs/nls'], function (nlsPlugin) {

0 commit comments

Comments
 (0)