diff options
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/config.rb | 2 | ||||
-rw-r--r-- | lib/chef/knife/core/bootstrap_context.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/package/rubygems.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/config.rb b/lib/chef/config.rb index 6c2cd00fd5..c3fd939628 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/lib/chef/knife/core/bootstrap_context.rb b/lib/chef/knife/core/bootstrap_context.rb index 81e9f0d933..ffc36436ec 100644 --- a/lib/chef/knife/core/bootstrap_context.rb +++ b/lib/chef/knife/core/bootstrap_context.rb @@ -135,7 +135,7 @@ CONFIG def latest_current_chef_version_string installer_version_string = nil if @config[:prerelease] - installer_version_string = "-p" + installer_version_string = ["-p"] else chef_version_string = if knife_config[:bootstrap_version] knife_config[:bootstrap_version] diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index 05d5619f65..21689503f0 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -536,7 +536,7 @@ class Chef else src = @new_resource.source && " --source=#{@new_resource.source} --source=https://rubygems.org" end - if version + if !version.nil? && version.length > 0 shell_out!("#{gem_binary_path} install #{name} -q --no-rdoc --no-ri -v \"#{version}\"#{src}#{opts}", :env=>nil) else shell_out!("#{gem_binary_path} install \"#{name}\" -q --no-rdoc --no-ri #{src}#{opts}", :env=>nil) |