summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-09-26 16:52:19 -0700
committerTim Smith <tsmith@chef.io>2017-09-26 16:52:19 -0700
commit93c9338aa4471d6b9ac991ce297750481fda0294 (patch)
tree155e71b73317219696be3965987ed92209d5278e /bin
parenta51cda521a6f9cc6371cddf3eeff64adf69630ae (diff)
downloadchef-93c9338aa4471d6b9ac991ce297750481fda0294.tar.gz
Force encoding to UTF_8 in chef-shell to prevent failuresencoding
Currently on some distros where the default isn't UTF (SUSE/omnios/probably others) chef-shell fails to launch with a nasty rb-readline error. It's not the best user experience. Lifting this line from Berkshelf fixes it and makes it easier to troubleshoot on those platforms. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/chef-shell2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/chef-shell b/bin/chef-shell
index 4d9300ebb7..9b10aa134b 100755
--- a/bin/chef-shell
+++ b/bin/chef-shell
@@ -23,6 +23,8 @@ begin
rescue LoadError
end
+Encoding.default_external = Encoding::UTF_8
+
require "irb"
require "irb/completion"
require "irb/ext/save-history"