summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Parsons <chris@thinkcodelearn.com>2012-07-13 14:38:07 +0200
committerBryan McLellan <btm@opscode.com>2012-08-27 12:27:17 -0700
commit22a8dd09adb72cd4cec337ec9060fff4a33a8b1b (patch)
treef3cd8e90fa819d1d026d5b25313cff5a752479cb
parent233407926a567ee9b5df169b5ae478803ff3dd5e (diff)
downloadchef-22a8dd09adb72cd4cec337ec9060fff4a33a8b1b.tar.gz
Force encoding to binary to prevent stacktrace with unicode input
-rw-r--r--chef/lib/chef/knife/ssh.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/chef/lib/chef/knife/ssh.rb b/chef/lib/chef/knife/ssh.rb
index 495db9717a..3ea50ff639 100644
--- a/chef/lib/chef/knife/ssh.rb
+++ b/chef/lib/chef/knife/ssh.rb
@@ -191,6 +191,7 @@ class Chef
exit_status = 0
subsession ||= session
command = fixup_sudo(command)
+ command.force_encoding('binary')
subsession.open_channel do |ch|
ch.request_pty
ch.exec command do |ch, success|