abort_on_prompts=True aborts even when host, password are set #417

bitprophet opened this Issue Aug 20, 2011 · 0 comments


None yet

1 participant


Valerie Ishida, on the mailing list, writes:

I tried the following code...

with fabric.api.settings(host_string="testuser@localhost", user="testuser", password="testuser", abort_on_prompts=True):
    fabric.api.run("ls /tmp")

Fatal error: Needed to prompt, but abort-on-prompts was set to True!


But if I run...

with fabric.api.settings(host_string="testuser@localhost", user="testuser", password="testuser"):
    fabric.api.run("ls /tmp")

It runs fine and does not prompt.

This seems a legitimate bug, where the handle_prompt_aborts() call in the internal @needs_host decorator, is at the outer level, and thus fires pretty much on any network related operation.

It instead needs to fire only inside the block which prompts for a host when env.host_string is not set.

@bitprophet bitprophet was assigned Aug 20, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment