From 6cf020389aca14d59889b5c13008d0c4427cc1ba Mon Sep 17 00:00:00 2001
From: Timo Furrer <tfurrer@gitlab.com>
Date: Wed, 13 Nov 2024 15:18:52 +0100
Subject: [PATCH] Rename `DEBUG_OUTPUT` to `GITLAB_TOFU_DEBUG`

Changelog: changed
---
 src/gitlab-tofu.sh          | 3 ++-
 tests/unit/gitlab-tofu.bats | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gitlab-tofu.sh b/src/gitlab-tofu.sh
index d95f0fc..660ede8 100644
--- a/src/gitlab-tofu.sh
+++ b/src/gitlab-tofu.sh
@@ -11,6 +11,7 @@
 #
 # Respected Environment Variables:
 # --------------------------------
+# GITLAB_TOFU_DEBUG: if set to true will enable xtrace.
 # GITLAB_TOFU_SOURCE: forces this script in source-mode. Required when source auto-detection fails.
 # GITLAB_TOFU_APPLY_NO_PLAN: if set to true, the apply command does not use a plan cache file.
 # GITLAB_TOFU_PLAN_NAME: the name of the plan cache and json files. Defaults to `plan`.
@@ -42,7 +43,7 @@
 # set some shell options
 set -o errexit
 
-if [ "${DEBUG_OUTPUT}" = "true" ]; then
+if [ "${GITLAB_TOFU_DEBUG}" = "true" ]; then
     set -o xtrace
 fi
 
diff --git a/tests/unit/gitlab-tofu.bats b/tests/unit/gitlab-tofu.bats
index e655ab9..75e34d2 100644
--- a/tests/unit/gitlab-tofu.bats
+++ b/tests/unit/gitlab-tofu.bats
@@ -7,7 +7,7 @@ load "$BATS_LIBS/bats-support/load"
 load "$BATS_LIBS/bats-assert/load"
 
 setup() {
-  export DEBUG_OUTPUT=true
+  export GITLAB_TOFU_DEBUG=true
 
   # Change cwd to test specific directory
   cd "$BATS_TEST_TMPDIR"
-- 
GitLab