Commit 2035e7ab authored by Volker Hilsheimer's avatar Volker Hilsheimer
Browse files

Don't try to expand envirnoment variables in nil values

parent 7d4df1ed
......@@ -161,6 +161,7 @@ def add_role(box, role, name, machine)
elsif value.is_a?(Array)
array = []
value.each do |entry|
next if entry.nil?
new_entry = expand_env(entry)
if new_entry.nil?
STDERR.puts "==> #{name}: Unexpanded environment variable in '#{entry}' - skipping role '#{role}'"
......@@ -172,6 +173,7 @@ def add_role(box, role, name, machine)
elsif value.is_a?(Hash)
new_hash = {}
value.each do |k, v|
next if v.nil?
new_key = expand_env(k)
new_value = expand_env(v)
if new_key.nil? || new_value.nil?
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment