Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion python/private/runtime_env_toolchain_interpreter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if [ -e "$self_dir/pyvenv.cfg" ] || [ -e "$self_dir/../pyvenv.cfg" ]; then
# binary, not the actual one invoked.
# NOTE: exec -a would be simpler, but isn't posix-compatible, and dash shell
# (Ubuntu/debian default) doesn't support it; see #3009.
exec sh -c "$PYTHON_BIN \$@" "$venv_bin" "$@"
exec sh -c 'exec "$@"' "$venv_bin" "$PYTHON_BIN" "$@"
else
exec "$PYTHON_BIN" "$@"
fi
1 change: 1 addition & 0 deletions tests/runtime_env_toolchain/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ py_reconfig_test(
py_reconfig_test(
name = "bootstrap_script_test",
srcs = ["toolchain_runs_test.py"],
args = ["argument with spaces"],
bootstrap_impl = "script",
data = [
"//tests/support:current_build_settings",
Expand Down
1 change: 1 addition & 0 deletions tests/runtime_env_toolchain/toolchain_runs_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def test_ran(self):
)

if settings["bootstrap_impl"] == "script":
self.assertEqual(sys.argv[1:], ["argument with spaces"])
# Verify we're running in a venv
self.assertNotEqual(sys.prefix, sys.base_prefix)
# .venv/ occurs for a build-time venv.
Expand Down