From 920317a9747677f6e129905fc6a8756ceed2dcdc Mon Sep 17 00:00:00 2001 From: Jacob Hummer Date: Mon, 29 May 2023 13:22:37 -0500 Subject: [PATCH 1/2] Use test -n --- src/clone.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clone.sh b/src/clone.sh index 9dc3ae4..30884ca 100755 --- a/src/clone.sh +++ b/src/clone.sh @@ -7,10 +7,10 @@ set -e # When a job fails, you can re-run it with debug mode enabled. This is exposed # to scripts via the ${{ runner.debug }} or $RUNNER_DEBUG variable. Here, we -# use the -z test to see if the $RUNNER_DEBUG exists. If so, we use the -x flag +# use the -n test to see if the $RUNNER_DEBUG exists. If so, we use the -x flag # to print a '+ cmd arg1 arg2' of each command that's run in the script. This # helps with debugging what commands and $VAR expansions are actually happening. -if [[ -z $RUNNER_DEBUG ]]; then +if [[ -n $RUNNER_DEBUG ]]; then set -x fi From 4ba990ab54233dbe2b6b291ab59cd6eac3e2caa5 Mon Sep 17 00:00:00 2001 From: Jacob Hummer Date: Mon, 29 May 2023 13:23:50 -0500 Subject: [PATCH 2/2] Use test -n here too --- src/init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init.sh b/src/init.sh index a90a9ed..5adee8e 100755 --- a/src/init.sh +++ b/src/init.sh @@ -7,10 +7,10 @@ set -e # When a job fails, you can re-run it with debug mode enabled. This is exposed # to scripts via the ${{ runner.debug }} or $RUNNER_DEBUG variable. Here, we -# use the -z test to see if the $RUNNER_DEBUG exists. If so, we use the -x flag +# use the -n test to see if the $RUNNER_DEBUG exists. If so, we use the -x flag # to print a '+ cmd arg1 arg2' of each command that's run in the script. This # helps with debugging what commands and $VAR expansions are actually happening. -if [[ -z $RUNNER_DEBUG ]]; then +if [[ -n $RUNNER_DEBUG ]]; then set -x fi