From 93c2d009be848c7d4b6c1250123910f4a3a2b4c7 Mon Sep 17 00:00:00 2001 From: Aaron McHale Date: Sun, 29 Mar 2026 22:15:41 +0100 Subject: [PATCH 1/6] Fix shellcheck --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54d0e2a..1f0554b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,8 @@ jobs: - uses: actions/checkout@v4 - name: Run shellcheck run: | + set -e + shellcheck --version find . -type f -name "*.sh" -exec shellcheck {} \; test: runs-on: ubuntu-latest From f473ac2dbffad524bb09613857e09951d693e42b Mon Sep 17 00:00:00 2001 From: Aaron McHale Date: Sun, 29 Mar 2026 22:22:21 +0100 Subject: [PATCH 2/6] Try using a action built for shellcheck --- .github/workflows/test.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f0554b..9518e45 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,11 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Run shellcheck - run: | - set -e - shellcheck --version - find . -type f -name "*.sh" -exec shellcheck {} \; + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@master test: runs-on: ubuntu-latest steps: From c2e883a903bf23fd8ecb18b15b6e38e59af2519e Mon Sep 17 00:00:00 2001 From: Aaron McHale Date: Sun, 29 Mar 2026 22:24:22 +0100 Subject: [PATCH 3/6] checkstyle format --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9518e45..735873e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,8 @@ jobs: - uses: actions/checkout@v4 - name: Run ShellCheck uses: ludeeus/action-shellcheck@master + with: + format: checkstyle test: runs-on: ubuntu-latest steps: From 1b8900466b4345e07e41f2e171c8ae9509717f57 Mon Sep 17 00:00:00 2001 From: Aaron McHale Date: Sun, 29 Mar 2026 22:25:11 +0100 Subject: [PATCH 4/6] tty format --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 735873e..d29408b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: - name: Run ShellCheck uses: ludeeus/action-shellcheck@master with: - format: checkstyle + format: tty test: runs-on: ubuntu-latest steps: From fba96845509cd3ab0b3fd6aa2417c9ddb4357f80 Mon Sep 17 00:00:00 2001 From: Aaron McHale Date: Sun, 29 Mar 2026 22:28:12 +0100 Subject: [PATCH 5/6] Severity style --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d29408b..06eeb1a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,7 @@ jobs: uses: ludeeus/action-shellcheck@master with: format: tty + severity: style test: runs-on: ubuntu-latest steps: From 737df68406fa4a370bbf72bb5a07add16f95a73b Mon Sep 17 00:00:00 2001 From: Aaron McHale Date: Fri, 3 Apr 2026 16:51:41 +0100 Subject: [PATCH 6/6] Fix errors --- cli.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cli.sh b/cli.sh index 1571935..26cbe15 100755 --- a/cli.sh +++ b/cli.sh @@ -4,8 +4,8 @@ set -u # Simple CLI wrapper that discovers scripts in the commands/ directory # Cd to the directory of this script, so it can be run from anywhere -realpath="$(realpath "$0")" -cd "${realpath%/*}" +realpath="$(realpath "$0")" || { echo "Failed to get realpath"; exit 1; } +cd "${realpath%/*}" || { echo "Failed to cd to script directory"; exit 1; } #################### # Helper functions # @@ -14,21 +14,21 @@ cd "${realpath%/*}" # Prints a warning message without exiting. # Usage: warning ... warning() { - local msg="$@" + local msg="$*" printf "\e[43m\e[30m[warning]\e[0m %s\n" "$msg" } # Prints a error message without exiting. # Usage: error ... error() { - local msg="$@" + local msg="$*" printf "\e[41m\e[39m[error] %s\e[0m\n" "$msg" } # Prints a success message without exiting. -# Usage: error ... +# Usage: success ... success() { - local msg="$@" + local msg="$*" printf "\e[42m\e[30m[success]\e[0m %s\n" "$msg" }