Skip to content
Snippets Groups Projects
Commit 53408c62 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Fix array printout

parent 87114b7a
No related branches found
No related tags found
No related merge requests found
......@@ -93,10 +93,12 @@ check_env() {
# Checks a given environment variable array is set (non-zero size)
# Then prints all of its components
check_array_env() {
check_defined "${1}"
for i in "${!1[@]}"; do
log_info "${1}[${i}]=${!1[${i}]}";
eval array=\( \${${1}[@]} \)
for i in "${!array[@]}"; do
log_info "${1}[${i}]=${array[${i}]}";
done
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment