From 1d986f74dd4f20731beebbd9ad52610c804b9484 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Wed, 5 Feb 2025 17:17:19 +0100 Subject: [PATCH] Improve Error Message --- entrypoint.sh | 2 +- tests/git-auto-commit.bats | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index c310c05..6bb1cbc 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -103,7 +103,7 @@ _check_if_is_git_repository() { _check_if_repository_is_in_detached_state() { if [ -z "$(git symbolic-ref HEAD)" ] then - _log "error" "Repository is in detached HEAD state. Please checkout a branch before committing."; + _log "error" "Repository is in detached HEAD state. Please make sure you check out a branch. Adjust the `ref` input accordingly."; exit 1; else _log "debug" "Repository is on a branch."; diff --git a/tests/git-auto-commit.bats b/tests/git-auto-commit.bats index 2e74075..fa2e26b 100644 --- a/tests/git-auto-commit.bats +++ b/tests/git-auto-commit.bats @@ -1107,5 +1107,5 @@ END run git_auto_commit assert_failure; - assert_line "::error::Repository is in detached HEAD state. Please checkout a branch before committing." + assert_line "::error::Repository is in detached HEAD state. Please make sure you check out a branch. Adjust the `ref` input accordingly." }