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
env.host not set #690
Comments
To be more speciffic, when fab asks me(in runtime) for hosts to run actions on env.host is not set |
Sounds like a bug, I can't think of a reason why it shouldn't fill out |
I can't replicate this (but I did write a new test for it! yay!). See upcoming commit notice. Basically, what I did was ensure that after a If you could, please:
I'll close the ticket for now as "can't reproduce" but I think you can reopen it when you comment (and if not obviously I will reopen it when you do!) Thanks a lot! |
Okay here is a way to reproduce and i found it not may be a bug, but just the way how fabric works:
Now run in the following way: fab test_task It looks like that hosts prompt gets displayed when first command is executed on remote server and it makes sense(since fabric can execute command also locally), but is there any way(decorator option) to require fabric to have host set even before first command is executed(i know that i can make something like run("exit 0") to issue connection)? Thanks! |
Ah, yes -- that's how Fabric has to work to allow local-only tasks to operate correct (docs). Depending on why you want the host set non-lazily, you might find the require() operation useful, which will cause things to bail out with a helpful-ish "where's my ?" message. Or you can use abort-on-prompts (it's a config setting and a CLI flag) which is similar but more rigorous, it will cause an abort for any prompt. This is good if your real problem is trying to run something unattended and you want to prevent fabric from hanging around waiting for input. Hope that helps. |
Env.host not set when fabfile called using fab without env.hosts specified in fab file.
The text was updated successfully, but these errors were encountered: