summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Albertson <lance@osuosl.org>2020-09-24 10:41:50 -0700
committerLance Albertson <lance@osuosl.org>2020-09-24 10:41:50 -0700
commitad81bbdf02eaeadf63c3089bff4ebb6a56a383fa (patch)
tree115c0419a99f878934a312b6c922905977fdbc15
parentc62cd7a4806aeeb64cb98dde3a5081567350f4ba (diff)
downloadchef-ad81bbdf02eaeadf63c3089bff4ebb6a56a383fa.tar.gz
Use ChefUtils::Dist::Infra::PRODUCT for locale warning instead of "Chef"
Signed-off-by: Lance Albertson <lance@osuosl.org>
-rw-r--r--chef-config/lib/chef-config/config.rb2
-rw-r--r--chef-config/spec/unit/config_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb
index 7451f744a7..37bd7fd448 100644
--- a/chef-config/lib/chef-config/config.rb
+++ b/chef-config/lib/chef-config/config.rb
@@ -1205,7 +1205,7 @@ module ChefConfig
# Transform into the form en_ZZ.UTF-8
guessed_locale.gsub(/UTF-?8$/i, "UTF-8")
else
- ChefConfig.logger.warn "Please install an English UTF-8 locale for Chef to use, falling back to C locale and disabling UTF-8 support."
+ ChefConfig.logger.warn "Please install an English UTF-8 locale for #{ChefUtils::Dist::Infra::PRODUCT} to use, falling back to C locale and disabling UTF-8 support."
"C"
end
end
diff --git a/chef-config/spec/unit/config_spec.rb b/chef-config/spec/unit/config_spec.rb
index 3ecf240158..3d7365927d 100644
--- a/chef-config/spec/unit/config_spec.rb
+++ b/chef-config/spec/unit/config_spec.rb
@@ -931,7 +931,7 @@ RSpec.describe ChefConfig::Config do
shared_examples_for "a suitable locale" do
it "returns an English UTF-8 locale" do
- expect(ChefConfig.logger).to_not receive(:warn).with(/Please install an English UTF-8 locale for Chef to use/)
+ expect(ChefConfig.logger).to_not receive(:warn).with(/Please install an English UTF-8 locale for Chef Infra Client to use/)
expect(ChefConfig.logger).to_not receive(:trace).with(/Defaulting to locale en_US.UTF-8 on Windows/)
expect(ChefConfig.logger).to_not receive(:trace).with(/No usable locale -a command found/)
expect(ChefConfig::Config.guess_internal_locale).to eq expected_locale
@@ -984,7 +984,7 @@ RSpec.describe ChefConfig::Config do
let(:locale_array) { ["af_ZA", "af_ZA.ISO8859-1", "af_ZA.ISO8859-15", "af_ZA.UTF-8"] }
it "should fall back to C locale" do
- expect(ChefConfig.logger).to receive(:warn).with("Please install an English UTF-8 locale for Chef to use, falling back to C locale and disabling UTF-8 support.")
+ expect(ChefConfig.logger).to receive(:warn).with("Please install an English UTF-8 locale for Chef Infra Client to use, falling back to C locale and disabling UTF-8 support.")
expect(ChefConfig::Config.guess_internal_locale).to eq "C"
end
end