Skip to content

fix: quote paths in stage1_bootstrap_template.sh - #4386

Merged
rickeylev merged 2 commits into
mainfrom
wyv-stage1-bootstrap-quoting
Oct 30, 2026
Merged

rickeylev merged 2 commits into
mainfrom
wyv-stage1-bootstrap-quoting

Conversation

@Wyverald

Copy link
Copy Markdown
Contributor

Unquoted path expansions in stage1_bootstrap_template.sh fail with word splitting when the executable symlink path, runfiles root directory, or RULES_PYTHON_EXTRACT_ROOT contains spaces (for example, in Bazel's bazel_determinism_test).

Quote $0, $stub_filename, $RUNFILES_DIR, $PYTHON_BINARY, $PYTHON_BINARY_ACTUAL, $RULES_PYTHON_EXTRACT_ROOT, $python_exe, and $venv_site_packages when resolving runfiles and creating runtime venvs, and extend the bootstrap runfiles and runtime venv tests to exercise paths with spaces.

Unquoted path expansions in stage1_bootstrap_template.sh fail with word
splitting when the executable symlink path, runfiles root directory, or
RULES_PYTHON_EXTRACT_ROOT contains spaces (for example, in Bazel's
bazel_determinism_test).

Quote $0, $stub_filename, $RUNFILES_DIR, $PYTHON_BINARY,
$PYTHON_BINARY_ACTUAL, $RULES_PYTHON_EXTRACT_ROOT, $python_exe, and
$venv_site_packages when resolving runfiles and creating runtime venvs,
and extend the bootstrap runfiles and runtime venv tests to exercise
paths with spaces.
@Wyverald

Copy link
Copy Markdown
Contributor Author

AI Disclosure: This PR was prepared with an AI coding assistant under human direction (human-reviewed), porting a patch authored for Bazel's integration tests. Review comments and follow-up changes on this PR will be handled or reviewed by @Wyverald before posting.

@rickeylev
rickeylev added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit e9734b5 Oct 30, 2026
18 checks passed
@rickeylev
rickeylev deleted the wyv-stage1-bootstrap-quoting branch October 30, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants