summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-11-25 14:45:10 -0800
committertyler-ball <tyleraball@gmail.com>2014-11-25 14:45:10 -0800
commit2e3ea9d76d4b8e912ff88b22b9cb29b9c8d9009c (patch)
tree70c0ccd28fab446b92a5db0ce6797fcfd49f7e2a /lib
parent2cabf9c5ba969ff89128d5334e36a76c766fce93 (diff)
parent5bab29b02248a4468a7fbf7f6226c30255c3abe3 (diff)
downloadchef-2e3ea9d76d4b8e912ff88b22b9cb29b9c8d9009c.tar.gz
Merge branch 'master' into tball/contrib-pass
Conflicts: CHANGELOG.md
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/config.rb2
-rw-r--r--lib/chef/knife/core/bootstrap_context.rb2
-rw-r--r--lib/chef/provider/package/rubygems.rb2
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)