Clear out hijackable options in darwin/bin/code.sh#204396
Clear out hijackable options in darwin/bin/code.sh#204396forivall wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Fixes microsoft#204005 Electron will log a warning when it is launched with these options, see electron/electron#40770 for more context.
|
Thanks the change makes sense, but we also need an update to Electron v27.3.1 for the fix to be complete. I will merge this PR after the version update. |
|
Actually this just workarounds the issue, we should be able to allow these variables in the integrated terminal when launching the application from terminal. This needs change in this runtime maybe a cli flag. Thanks for the PR, closing as this is not the best way forward for the linked issue. |
|
The environment variables inside of vscode are retrieved by launching a shell process internally and then reading the environment variables from it. This is just for the cli wrapper script, which most of the time, the launched process just connects to the existing editor process over IPC and doesn't modify the environment of the running code process. Please correct me if vscode does make use of the environment variables on first launch or in the IPC case. In that situation, I can think of a few more solutions. |
|
The change won't affect the shell process as you mentioned but it will affect the integrated terminal since the terminal agent is a forked child process and it will inherit the unset changes. To confirm, make the changes in this PR to |
|
A possible way forward would be copy the variables into temporary, unset them in the cli wrapper and restore the temporary as original before application launch. |
Yeah, that was one of the ways I was thinking of, but as I was and am now on my phone on transit, I didn't want to get into it 😅 thanks for the feedback! |
Fixes #204005
Electron will log a warning when it is launched with these options, see electron/electron#40770 for more context.