summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2020-08-25 15:57:59 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2020-08-25 15:57:59 -0700
commitb93bb1ec4abc31e7babc2b437e9ee6c0b03ccfbb (patch)
tree08bf32dd1b7b780314c6cf230644629c74cdc6b1
parent483a5295873a411a36357a6d02ad725e1e15008d (diff)
downloadohai-b93bb1ec4abc31e7babc2b437e9ee6c0b03ccfbb.tar.gz
fix the deafult locale
we need to call out to the ChefConfig helper to set this Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--spec/unit/mixin/shell_out_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/unit/mixin/shell_out_spec.rb b/spec/unit/mixin/shell_out_spec.rb
index 1b3dac51..f02c9c13 100644
--- a/spec/unit/mixin/shell_out_spec.rb
+++ b/spec/unit/mixin/shell_out_spec.rb
@@ -33,12 +33,13 @@ describe Ohai::Mixin::ShellOut, "shell_out" do
else
# this just replicates the behavior of default_paths in chef-utils
default_paths = ( [ ENV['PATH'] ? ENV['PATH'].split(':').reverse : nil, RbConfig::CONFIG["bindir"] ].uniq.reverse + [ "/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin" ] ).compact.uniq.join(":")
+ default_locale = ChefConfig::Config.guess_internal_locale
{
timeout: timeout,
environment: {
- "LANG" => "en_US.UTF-8",
- "LANGUAGE" => "en_US.UTF-8",
- "LC_ALL" => "en_US.UTF-8",
+ "LANG" => default_locale,
+ "LANGUAGE" => default_locale,
+ "LC_ALL" => default_locale,
"PATH" => default_paths,
},
}