From a635091a3ae0f0afd8bd6e4a03d7bc89e7e911b3 Mon Sep 17 00:00:00 2001
From: Wilken Rivera <dev@wilkenrivera.com>
Date: Mon, 5 Feb 2024 13:14:24 -0500
Subject: [PATCH] Managed by Terraform: Update go-validate.yml GitHub workflow

---
 .github/workflows/go-validate.yml | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/go-validate.yml b/.github/workflows/go-validate.yml
index 7765a18..aef23cd 100644
--- a/.github/workflows/go-validate.yml
+++ b/.github/workflows/go-validate.yml
@@ -84,6 +84,13 @@ jobs:
       - run: |
           export PATH=$PATH:$(go env GOPATH)/bin
           make generate
-          git diff --exit-code || ( echo "Found diffs in generated code" \
-              && echo "You can use the command: \`make generate\` to reformat code." \
-              && false )
+          uncommitted="$(git status -s)"
+          if [[ -z "$uncommitted" ]]; then
+            echo "OK"
+          else
+            echo "Docs have been updated, but the compiled docs have not been committed."
+            echo "Run 'make generate', and commit the result to resolve this error."
+            echo "Generated but uncommitted files:"
+            echo "$uncommitted"
+            exit 1
+          fi