How to answer to prompts automatically with python fabric?

后端 未结 6 1242
一个人的身影
一个人的身影 2020-11-29 23:42

I want to run a command which prompts me to enter yes/no or y/n or whatever. If I just run the command local(\"my_command\") then it stops and asks me for input

6条回答
  •  -上瘾入骨i
    2020-11-30 00:30

    Putting this as an answer though its a comment from @BobNadler

    run("yes | my_command");

提交回复
热议问题