summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Tschuy <tschuy@osuosl.org>2015-11-10 15:56:38 -0800
committerEvan Tschuy <tschuy@osuosl.org>2015-11-10 15:56:38 -0800
commit7509be4b0085f9e759d3c1461240f6d20eff4138 (patch)
tree60680d212a2004c7b454c7989a8e2e94d6f457c5 /lib
parent6c99e0be2f79f3392fd83149fe03ec57eefef175 (diff)
downloadmixlib-shellout-7509be4b0085f9e759d3c1461240f6d20eff4138.tar.gz
convert environment hash keys to strings
by converting the hash keys to strings, we can use symbols in our environment blocks: environment {FOO: 'bar', SHELL: 'zsh'}
Diffstat (limited to 'lib')
-rw-r--r--lib/mixlib/shellout.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/mixlib/shellout.rb b/lib/mixlib/shellout.rb
index c77fdcf..6f8730f 100644
--- a/lib/mixlib/shellout.rb
+++ b/lib/mixlib/shellout.rb
@@ -332,7 +332,11 @@ module Mixlib
when 'log_tag'
self.log_tag = setting
when 'environment', 'env'
- self.environment = setting || {}
+ if setting
+ self.environment = Hash[setting.map{|(k,v)| [k.to_s,v]}]
+ else
+ self.environment = {}
+ end
when 'login'
self.login = setting
else