need to escape $ in if-clause (but not in if-cond) to be eval'd

This commit is contained in:
Michael Bradley, Jr 2018-08-24 12:43:38 -05:00
parent 9b91fde09c
commit 39e22eade5
1 changed files with 2 additions and 2 deletions

4
run.sh
View File

@ -45,8 +45,8 @@ run_embark () {
# do not alter indentation, tabs in lines below
do
local include_var=$(cat <<- ENV_VAR
if [[ -n $env_var && -v $env_var ]]; then
run_opts=( "${run_opts[@]}" "-e" "$env_var" )
if [[ -v $env_var ]]; then
run_opts=( "\${run_opts[@]}" "-e" "\$env_var" )
fi
ENV_VAR
)