Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alexandru Croitor
minicoin
Commits
2035e7ab
Commit
2035e7ab
authored
Mar 04, 2022
by
Volker Hilsheimer
Browse files
Don't try to expand envirnoment variables in nil values
parent
7d4df1ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
minicoin/lib/roles.rb
View file @
2035e7ab
...
...
@@ -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?
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment