summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-12-11 07:19:57 -0800
committerGitHub <noreply@github.com>2020-12-11 07:19:57 -0800
commit28d7f925b96160b8c3fd22ee586cad4c63c473d0 (patch)
treef7770b1f720237fa05ac4a0a2f562e8859bf308a
parentc110eb47276b916078590d69cd9c147f5762bd45 (diff)
parent8acb7f40faa74bb774ca7ec813bbbe391525d1b3 (diff)
downloadchef-28d7f925b96160b8c3fd22ee586cad4c63c473d0.tar.gz
Merge pull request #10728 from rveznaver/fix-pty-sudo
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/knife/ssh.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb
index 8b254c13aa..8681fdfd02 100644
--- a/lib/chef/knife/ssh.rb
+++ b/lib/chef/knife/ssh.rb
@@ -385,6 +385,8 @@ class Chef
end
ch.on_extended_data do |_, _type, data|
+ raise ArgumentError if data.eql?("sudo: no tty present and no askpass program specified\n")
+
stderr += data
end