From 2940bf37eb898958d566b50ab9c25eeefdddf8a6 Mon Sep 17 00:00:00 2001 From: Mahyar McDonald Date: Tue, 4 Nov 2025 08:59:25 -0800 Subject: [PATCH] nicer error msg --- pre_cache_action.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pre_cache_action.sh b/pre_cache_action.sh index bc142ca..a01ed05 100755 --- a/pre_cache_action.sh +++ b/pre_cache_action.sh @@ -93,12 +93,20 @@ if test -z "${combined_packages}"; then exit 0 ;; warn) - echo "::warning::Packages argument is empty. Please provide packages via the 'packages' input or create an Aptfile at the repository root." + if test "${use_aptfile}" = "true"; then + echo "::warning::Packages argument is empty. Please provide packages via the 'packages' input or create an Aptfile at the repository root." + else + echo "::warning::Packages argument is empty. Please provide packages via the 'packages' input." + fi exit 0 ;; *) log "aborted" - log "Packages argument cannot be empty. Please provide packages via the 'packages' input or create an Aptfile at the repository root." >&2 + if test "${use_aptfile}" = "true"; then + log "Packages argument cannot be empty. Please provide packages via the 'packages' input or create an Aptfile at the repository root." >&2 + else + log "Packages argument cannot be empty. Please provide packages via the 'packages' input." >&2 + fi exit 3 ;; esac