Skip to content

Commit

Permalink
Fix 'terraformsh apply' with no varfiles
Browse files Browse the repository at this point in the history
Fixes Issue #30
  • Loading branch information
peterwwillis committed Apr 7, 2024
1 parent f54cd68 commit 2f52759
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions terraformsh
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ _cmd_apply () {
local errored=0 ret
[ "${NO_DEP_CMDS:-0}" = "0" ] && _cmd_init
declare -a args=("$@")
local varfile_arg=("")
local varfile_arg=()
if [ $USE_PLANFILE -eq 1 ]; then
args+=("$TF_PLANFILE") # Pass plan file after '$@'
else
elif [ ${#VARFILE_ARG[@]} -gt 0 ] ; then
varfile_arg=("${VARFILE_ARG[@]}") # only if planfile disabled
fi
[ ! -e errored.tfstate ] || errored=1 # Ignore pre-existing errored.tfstate
Expand Down

0 comments on commit 2f52759

Please sign in to comment.