Skip to content

Commit

Permalink
pass variables to workspace select
Browse files Browse the repository at this point in the history
  • Loading branch information
dflook committed Dec 29, 2024
1 parent a271ae9 commit 9ab57d3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions image/actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,10 @@ function set-init-args() {
done
fi

set-variable-args

if [[ -v OPENTOFU && $TERRAFORM_VER_MINOR -ge 8 ]]; then
debug "Preparing variables for early evaluation"
set-variable-args
INIT_ARGS="$INIT_ARGS $VARIABLE_ARGS"
fi

Expand Down Expand Up @@ -305,9 +306,9 @@ function init-backend-default-workspace() {
function select-workspace() {
local WORKSPACE_EXIT

debug_log $TOOL_COMMAND_NAME workspace select '$VARIABLE_ARGS' "$INPUT_WORKSPACE" # don't expand VARIABLE_ARGS
debug_log $TOOL_COMMAND_NAME '$VARIABLE_ARGS' workspace select "$INPUT_WORKSPACE" # don't expand VARIABLE_ARGS
set +e
(cd "$INPUT_PATH" && $TOOL_COMMAND_NAME workspace select "$VARIABLE_ARGS" "$INPUT_WORKSPACE") >"$STEP_TMP_DIR/workspace_select" 2>&1
(cd "$INPUT_PATH" && $TOOL_COMMAND_NAME "$VARIABLE_ARGS" workspace select "$INPUT_WORKSPACE") >"$STEP_TMP_DIR/workspace_select" 2>&1
WORKSPACE_EXIT=$?
set -e

Expand Down

0 comments on commit 9ab57d3

Please sign in to comment.