From 00cf7dc57e9dcf576d4ae45c4fdfa949761e9afc Mon Sep 17 00:00:00 2001 From: Barry Morrison <689591+esacteksab@users.noreply.github.com> Date: Sat, 18 Jan 2025 05:41:37 -0600 Subject: [PATCH 1/2] chore(deps): update shellcheck-py pre-commit hook --- .pre-commit-config.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c9465d..fd81ddd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,4 @@ repos: - - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: @@ -29,7 +28,7 @@ repos: - id: spelling-sort - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.9.0.2 + rev: v0.10.0.1 hooks: - id: shellcheck name: lint shell scripts with shellcheck From dc81b82824db3edc85033d798f2dc201c70013b6 Mon Sep 17 00:00:00 2001 From: Barry Morrison <689591+esacteksab@users.noreply.github.com> Date: Sat, 18 Jan 2025 05:41:58 -0600 Subject: [PATCH 2/2] use npx rather than trying to calculate value --- pre-commit-gen-docs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pre-commit-gen-docs b/pre-commit-gen-docs index 6336fd7..587bcb1 100755 --- a/pre-commit-gen-docs +++ b/pre-commit-gen-docs @@ -3,8 +3,8 @@ set -eu -o pipefail # Get the directory of this file inside pre-commit cache -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -ADR_BIN="${DIR}/../../node_modules/.bin/adr-log" +#DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +#ADR_BIN="${DIR}/../../node_modules/.bin/adr-log" # Rename ADR to whatever we want function rename { @@ -20,7 +20,7 @@ function update_index { pushd "${dir}" > /dev/null || return # Rebuild the index && remove both newlines that it adds - node "${ADR_BIN}" -i && chomp index.md && chomp index.md + npx adr-log -i && chomp index.md && chomp index.md # We need to rename ADR to a different name title=$(basename "$1")