Skip to content
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

gh-127503 Don't propagate native PATH to Emscripten Python #127633

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Tools/wasm/emscripten/node_entry.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ const settings = {
mountDirectories(Module);
Module.FS.chdir(process.cwd());
Object.assign(Module.ENV, process.env);
delete Module.ENV.PATH;
},
// Ensure that sys.executable, sys._base_executable, etc point to python.sh
// not to this file. To properly handle symlinks, python.sh needs to compute
// its own path.
thisProgram: process.argv[thisProgramIndex],
thisProgram: process.argv[thisProgramIndex].slice(thisProgram.length),
// After python.sh come the arguments thatthe user passed to python.sh.
arguments: process.argv.slice(thisProgramIndex + 1),
};
Expand Down
Loading