-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
'abort_on_prompts' overrides warn_only = True #762
Comments
(Protip, use the "Github Flavored Markdown" link above text fields, it will show you how to format things correctly. Fixed your description for you :)) I would argue that in most cases when users toggle However I acknowledge that this situation where both are True, is not well defined/documented. Additionally, most other uses of I'll make the call for now that consistency trumps the possibility of a user trying to abort-on-prompts and being thwarted by an unexpected |
On reflection, I'm really torn on this; I can see the change screwing things up for users who, as mentioned, truly do want Fabric to blow up on unexpected prompts. Hidden errors can be incredibly frustrating to track down. @pkittenis -- what real world situation are you running into where this is a problem for you? Would you be able to use If you're hard blocked by this, what might make more sense is to add some new config option (with some dumb name like |
The issue is that the behaviour of When using fabric as an API, that is just wrong IMO. The user of the API has already set Then the user sets Can work-around for now by resetting I suppose what would be best would be a flag to completely disable built in fabric prompts that are meant to be used on the command line, particurarly the |
+1 -- I am running into this very issue right now. My concrete use case is that I am using Fabric in order to do a check on recently-provisioned cloud nodes and confirm whether those nodes have SSH access with the appropriate public key. As a result, I need to actually catch the abort_on_prompts exception. For now I'm just going to explicitly catch SystemExit, but this feels very wrong indeed. |
+1 -- I would also like to catch abort_on_prompts exceptions. |
👍 I'm in the same situation where I don't want |
At this stage I feel this level of change fits better in version 2.0 which is being designed with the API use case first & the CLI use case as a secondary/wrapper use case. Changing the behavior in 1.x will be too surprising/confusing/liable to add bugs. Tagging as 2.x and leaving open so I can hopefully revisit & make sure I consider it when writing that part of the API. |
+1 |
+1 -- when both abort_on_prompts and warn_only are True, warn_only should prevail. A newer setting to do this is fine as well |
Any update on this ? See by yourself:
I just want to keep the line after Aborting. I don't want to see the error messages. |
I'm also running into this issue and would love to see the current behavior changed. |
Trying to use both abort_on_prompts and warn_only = True makes abort_on_prompts override warn_only and fabric still throws a SystemExit
The text was updated successfully, but these errors were encountered: