-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
CMD.exe's Terminate Batch Script Prompt is Swallowed When Using a Wait Bar While Running a bat
Script
#811
Comments
CMD.exe
's Terminate Batch Script Prompt is Swallowed When Using a Wait Bar While Running a bat
Scriptbat
Script
bat
Scriptbat
Script
Summarizing previous discussion in #809: @rmartin16 @freakboy3742 if str(args[0]).endswith(".bat") and self.command.input._active_wait_bar:
self.command.input._active_wait_bar.stop()
self.command.input.is_output_controlled = False Naively putting that at the top of That said, we were depending on the Wait Bars as a proxy mechanism to get spawned process output in to the log.....so, a lot in the air I guess.....this is a card close to the bottom of the house in a way... @mhsmith |
To make sure it is clear, there is apparently no known msft-endorsed method to default a choice for the The most straightforward solution right now is not to wrap
No 2 starts to get more at the root of the problem since it implies a lot of briefcase's logging infrastructure needs to be disabled for To demonstrate the issue without the Wait Bar: remove the Wait Bar and add It may be possible to still circumvent all this on Windows and still get logging but more experimentation is necessary. |
Thanks for that summary, and for splitting this issue out from #809. Clarifying some of my positions from past discussions:
|
@mhsmith, we fixed the deadlock, but are you still seeing the I was trying to replicate this again but Briefcase is able to wrap up and exit despite cmd's Terminate message. In #809, we both reported Briefcase just appeared to hang until another CTRL+C was sent... |
I think there may still be some issues here, but I won't have time to test it today. Let me get back to you tomorrow. |
The
The exception is |
All right, thank you for going through all those, @mhsmith. I'll put together a PR to stop the Wait Bar if it's running when |
Disable Wait Bar for Windows batch scripts (Fixes #811)
This originated from and is made significantly worse by:
build
orrun
causes briefcase to hang #809However, all Python versions are affected by the aspect described here.
Describe the bug
CMD.exe
emits aTerminate batch job (Y/N)?
prompt to the user when a CTRL+C is sent during execution of a batch script. AFAICT, this is to allow the execution of the rest of batch script while canceling its current action (perhaps similar to bash's default behavior of continuing on error withoutset -e
). This behavior will be ubiquitous regardless of the shell the user started briefcase in; all shells in Windows (e.g. powershell, terminal, msys2) will all defer batch script interpretation tocmd
.Many of the Android tools are invoked from
bat
scripts provided from Google. For instance, sending a CTRL+C while building an Android APK results in:cmd
emitting its terminate promptTo Reproduce
Steps to reproduce the behavior:
briefcase build android gradle
Building...
Wait Bar starts, send CTRL+CExpected behavior
CTRL+C should allow the user to exit or provide clear instructions (such as the terminate batch prompt) on how to exit.
Environment:
The text was updated successfully, but these errors were encountered: