-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment variables are eaten by zypak-helper when ELECTRON_RUN_AS_NODE=1 #19
Comments
For some context: the whole reason In theory, Zypak should just be saving the original environment to more closely follow the original behavior, then this would work (I think). I'll just need to fiddle with it a bit to make sure it doesn't break anything. |
From what I can tell, the only issue with vscode and zypak which can't be worked around is that |
https://github.com/refi64/zypak/blob/main/src/preload/host/exec_zypak_sandbox.cc#L44
When The lost env causes that |
Is there some particular env var responsible for |
I got it wrong, It's not about the environment variables on From the code
|
Seems like a distinct issue, then. |
Please try the main branch with |
Using |
Yep, seems to work for Code-OSS as well. |
The problem appears when run electron with
ELECTRON_RUN_AS_NODE=1
It seems that it will start node cli first without using of
chrome-sandbox
, and then spawn(vscode) it self to run with chromeIf I use
zypak-wrapper
at first withCHROME_WRAPPER
, that spawning will be overridden tozypak-helper exec-latest $CHROME_WRAPPER ...
Here
zypak-helper exec-latest
will spawn a new sandbox environment(I'm not sure, as I don't known howSpawnLatest
works)As a result, the environment variables will not be inherited, which will cause some problems(linked below), as the first run_as_node may set some environment variables used by electron
flathub/com.visualstudio.code#261
flathub/com.visualstudio.code#259
flathub/com.visualstudio.code#237
I think maybe do
execvp
withoutzypak-helper exec-latest
whenZYPAK_DISABLE_SANDBOX=1
withCHROME_WRAPPER
to solve this problemNeed
unset ZYPAK_DISABLE_SANDBOX
inCHROME_WRAPPER
script or in the overriddenexecvp
The text was updated successfully, but these errors were encountered: