Skip to content
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

Run with configured watched not working #1915

Open
cdjoubert opened this issue Dec 11, 2018 · 0 comments
Open

Run with configured watched not working #1915

cdjoubert opened this issue Dec 11, 2018 · 0 comments

Comments

@cdjoubert
Copy link

Hi,
In the following piece of code, I get an automatic response to sudo if the line with "ctx.config.newvar" is left commented. When it is uncommented, I am still asked for a password. I don't understand why.
My versions :
Fabric 2.4.0
Paramiko 2.4.2
Invoke 1.2.0

@task
def test5(ctx):
    sudo_pass = getpass.getpass("What's your sudo password ? ")
    responder = Responder(
        pattern=r'\[sudo\].*pass.*: *',
        response= sudo_pass + "\n",
        )
    ctx.config.run.watchers.append(responder)
    #ctx.config.newvar = True # sudo won't work if this line is decommented. Why ?
    ctx.run("sudo whoami", pty=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant