From c9ce9ebb2e1d23bf44e78b49f700aa9eba835c78 Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 28 Aug 2019 16:40:29 -0500 Subject: [PATCH] Fix spawns against Node For example some code tries to run -e against the binary but that fails since we inject our entry file every time the binary is invoked. Fixes #932. --- main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.js b/main.js index afb6a1d9..aa3760e1 100644 --- a/main.js +++ b/main.js @@ -1 +1,7 @@ +// Once our entry file is loaded we no longer need nbin to bypass normal Node +// execution. We can still shim the fs into the binary even when bypassing. This +// will ensure for example that a spawn like `${process.argv[0]} -e` will work +// while still allowing us to access files within the binary. +process.env.NBIN_BYPASS = true; + require("../../bootstrap-amd").load("vs/server/src/cli");