Skip to content

configure: quote generated shell environment values#752

Open
moreaki wants to merge 1 commit into
VirtualBox:mainfrom
moreaki:agent/configure-env-shell-quote
Open

configure: quote generated shell environment values#752
moreaki wants to merge 1 commit into
VirtualBox:mainfrom
moreaki:agent/configure-env-shell-quote

Conversation

@moreaki

@moreaki moreaki commented Jul 8, 2026

Copy link
Copy Markdown

Summary

Quote non-Windows generated env.sh values before writing export KEY=value lines.

This keeps source ./env.sh working when inherited environment values contain spaces, for example a PATH entry under a macOS .app bundle.

Windows env.bat output is left unchanged.

Why

Without quoting, a generated line such as:

export PATH=/usr/bin:/Applications/Little Snitch.app/Contents/Components:/bin

is parsed by the shell as a split assignment and an invalid additional export argument. The generated POSIX shell environment file should emit a quoted value instead.

Validation

  • python3 -m py_compile configure.py
  • Generated a test env.sh value with /Applications/Little Snitch.app/... in PATH and verified that source restores the exact original value.
  • git diff --check

Closes #750.

Quote non-Windows env.sh values when writing generated build environment files. This keeps source ./env.sh working when inherited environment values such as PATH contain spaces.

Windows env.bat output is left unchanged.

Signed-off-by: Roberto Nibali <rnibali@gmail.com>
@oracle-contributor-agreement

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

configure.py: quote generated shell environment values

1 participant