Do not directly use string in bash array arguments.
More recent versions of bash do not handle this as expected.
Move explicit string to a variable and then use that variable to access the array.
generate_load_settings(){
local failure=
local i=
+ local key=
if [[ $settings_file == "" ]] ; then
echo -e "${c_error}ERROR: no settings file has been defined.$c_reset"
done
if [[ $project_name == "" ]] ; then
- if [[ $variables['project_name'] != "" ]] ; then
- project_built="-${variables['project_name']}"
+ key="project_name"
+ if [[ ${variables[$key]} != "" ]] ; then
+ project_built="-${variables[$key]}"
fi
fi
}