-
Notifications
You must be signed in to change notification settings - Fork 509
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
Suppress prompt spawned by subprocess when using pythonw #1079
Suppress prompt spawned by subprocess when using pythonw #1079
Conversation
0f82f69
to
c7794ad
Compare
c7794ad
to
d3e0b9f
Compare
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Here's a one-liner to invoke the subprocess call with pythonw -c 'import sentry_sdk; sentry_sdk.utils.get_default_release()' Tested on Windows 11, in Windows Terminal, with Git Bash and Command Prompt. (The subprocess popup emitted within a Bash shell is persistent and easier to verify.) |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
I know it has been years @collinbanko but if you bring your branch up to date with our new master and resolve the conflict, than I will merge it immediately! promised! |
Oh, nevermind @collinbanko , I figured out how to create a PR that has no conflicts and still has your commits in it: #2936 Will merge the other one in favor of this one. Thanks again for the contribution and sorry for the long time it took. Will close this PR and merge the other one. |
Thank you for getting this merged in @antonpirker! Better late than never 😄 |
On Windows, using pythonw.exe for GUI applications, while determining the release using Git via subprocess a command prompt window is temporarily visible.
This fix updates the subprocess
STARTUPINFO
dwFlags to use the wShowWindow attribute, which defaults toSW_HIDE
hiding the prompt.