-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix test fail triggered by multiline environment variables #2875
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
Conversation
Fix `test_passthrough_environment` fails when an environment variable has multiple lines
@swift-ci please test |
The Linux test failed, but the failure seems not caused by this change... Could you find the root of it? @MaxDesiatov 😂 |
@swift-ci please test |
Can anyone merge this? I’d like to see the effect on Azure CI. |
Thanks for looking into this @stevapple. Can you expand the commit message to explain why multi line values don't work? https://docs.microsoft.com/en-us/windows/win32/procthread/environment-variables doesn't seem to indicate the restriction. |
@compnerd It’s not a problem of Windows actually. First of all, Azure CI environment sometimes contains multiline environment variables, which is really a rare case. The former handler of |
I guess the question is why does this not impact other platforms? I assume that it is an issue only because it is splitting on the newline? |
It’s because multiline environment variable is really a rare case. A regular machine won’t have that. Azure CI is triggering it because it stores the latest commit message in an environment variable. I believe the problem will also occur if we manually set an environment variable with multiple lines on Linux and macOS. |
Then, why should this not apply to all targets instead of being windows only? The problem exists in all of the cases it sounds like, |
The patch is applied to all platforms. The |
Fix
TestProcess.test_passthrough_environment
fails when an environment variable has multiple lines.