Working dir input.

This commit is contained in:
2025-11-07 12:54:16 -05:00
parent 7d530c7266
commit 1b630100a5
2 changed files with 19 additions and 8 deletions
+10 -1
View File
@@ -9,7 +9,16 @@ export PATH="${PATH}:/home/runner/.opentofu/bin"
COMMAND="$1" # fmt | init | plan | validate
COMMENTER_INPUT="$2" # stdout/stderr output OR newline-separated file list (for fmt)
COMMENTER_EXITCODE="$3" # exit code from previous step
WORKSPACE="${TF_WORKSPACE:-default}"
WORKING_DIR="$4"
# Change to working directory if provided
if [[ -n "$WORKING_DIR" ]]; then
echo "Switching to working directory: $WORKING_DIR"
cd "$WORKING_DIR" || { echo "Directory $WORKING_DIR not found"; exit 1; }
fi
# Strip ANSI codes from input
# INPUT=$(echo "$INPUT" | sed 's/\x1b\[[0-9;]*m//g')
##################
# CI Detection