fix: feature-flag CREATE_NO_WINDOW to not break stderr inheritance#1971
Merged
clux merged 1 commit intoApr 13, 2026
Merged
Conversation
Signed-off-by: gabriela <gabrielac@metalbear.co>
bb20073 to
4d7d229
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1971 +/- ##
=====================================
Coverage 76.5% 76.5%
=====================================
Files 89 89
Lines 8587 8587
=====================================
Hits 6563 6563
Misses 2024 2024
🚀 New features to boost your workflow:
|
clux
approved these changes
Apr 13, 2026
Member
clux
left a comment
There was a problem hiding this comment.
This is all good to me. Thank you!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Please refer to #1901 for a thorough description of the issue.
To summarize, setting the
CREATE_NO_WINDOWflag in process creation for Windows makes it so that the stderr inheritance breaks (writes ~only happen when the process ends).In a scenario with interactive login, device code verification messages would get passed to stderr, but with the current code, they would not be shown until the process would end, making 2FA impossible to fulfill.
Solution
I merely introduced the consensus we came to in the issue (inline envvar check). If there are changes required, I'll do them.
I chose to omit tests, etc, because the Windows tests situation already seems to be rather messy, and testing this is kind of annoying (though doable.)