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=True aborts even when host, password are set #417

Closed
bitprophet opened this Issue Aug 20, 2011 · 0 comments

Comments

Projects
None yet
1 participant
@bitprophet
Member

bitprophet commented Aug 20, 2011

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!

Aborting.

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.

@ghost ghost assigned bitprophet Aug 20, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment