Fix: Don't pass ELECTRON_RUN_AS_NODE
to subprocess
#305
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change addresses #303, which prevents commit messages from being written in remote hosts.
In VSCode's
server-cli.js
, it checks for theELECTRON_RUN_AS_NODE
environment variable, and if it's present it maps thefs
module to point to theoriginal-fs
module:This module is present in Electron, but not in base NodeJS; base NodeJS is what's used by the VSCode remote server, so having this environment variable present when
code
is called from a subprocess will cause failure.An alternative, but more involved, fix here might be to move to using
ShellExecution
orProcessExecution
rather thanchild_process
; I expect that they will support callingcode
from a nested process, but they have a fairly different API.