Skip to content

Fix input environment not being respected by swift_build_support.shell.run() #40300

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

Merged
merged 4 commits into from
Mar 13, 2022
Merged

Conversation

gwynne
Copy link
Contributor

@gwynne gwynne commented Nov 26, 2021

In swift_build_support's shell module, the run() function was removing the passed-in environment from the keyword arguments dictionary, preventing it from being passed along to subprocess.Popen().

This appears to only have affected update_checkout, and therein, the only usage of run() with non-default environment was in the obtain_additional_swift_sources() function. The effect was to ignore the attempt to set GIT_TERMINAL_PROMPT=0 for the git clone, git checkout, and git submodule commands.

Hardly catastrophic, but it's nonetheless a little unpleasant that this went completely unnoticed since at least 2017. (Admittedly because it didn't really affect much of anything.)

(Note: Also had to fix the actual use site in update_checkout to pass a string rather than a number as the environment value - this has been broken since at least 8c721de)

…mand that's running _before_ executing it instead of after so the user can actually see what's going on instead of getting confused by the ordering of the output after the fact.
@gwynne
Copy link
Contributor Author

gwynne commented Dec 6, 2021

@swift-ci please smoke test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swift-ci please test

@compnerd
Copy link
Member

@swift-ci please test

@compnerd compnerd merged commit e737770 into swiftlang:main Mar 13, 2022
@gwynne gwynne deleted the patch-1 branch April 9, 2023 00:05
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