diff options
-rw-r--r-- | lib/chef/config.rb | 2 | ||||
-rw-r--r-- | spec/unit/config_spec.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/config.rb b/lib/chef/config.rb index 08ce1a8ff6..538271de0e 100644 --- a/lib/chef/config.rb +++ b/lib/chef/config.rb @@ -632,7 +632,7 @@ class Chef # # For example, on CentOS 6 with ENV['LANG'] = "en_US.UTF-8", # `locale -a`.split fails with ArgumentError invalid UTF-8 encoding. - locales = shell_out_with_systems_locale("locale -a").stdout.split + locales = shell_out_with_systems_locale!("locale -a").stdout.split case when locales.include?('C.UTF-8') 'C.UTF-8' diff --git a/spec/unit/config_spec.rb b/spec/unit/config_spec.rb index 58fb229c96..ed2003e8bf 100644 --- a/spec/unit/config_spec.rb +++ b/spec/unit/config_spec.rb @@ -426,7 +426,7 @@ describe Chef::Config do let(:locales) { locale_array.join("\n") } before do - allow(Chef::Config).to receive(:shell_out_with_systems_locale).with("locale -a").and_return(shell_out) + allow(Chef::Config).to receive(:shell_out_with_systems_locale!).with("locale -a").and_return(shell_out) end shared_examples_for "a suitable locale" do @@ -493,7 +493,7 @@ describe Chef::Config do let(:locale_array) { [] } before do - allow(Chef::Config).to receive(:shell_out_with_systems_locale).and_raise("THIS IS AN ERROR") + allow(Chef::Config).to receive(:shell_out_with_systems_locale!).and_raise("THIS IS AN ERROR") end it "should default to 'en_US.UTF-8'" do |