From a65578d5e7166469ed4a9c564db9e10845b217cf Mon Sep 17 00:00:00 2001 From: Simon Golms Date: Fri, 11 Nov 2022 09:33:24 +0100 Subject: [PATCH] chore(husky): force basename/dirname to treat $0 as an argument - ref: https://github.com/typicode/husky/pull/1132 --- .husky/commit-msg | 2 +- .husky/post-merge | 2 +- .husky/pre-commit | 2 +- .husky/pre-push | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index cc62bc5..47de618 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,4 @@ #!/usr/bin/env sh -. "$(dirname "$0")/_/husky.sh" +. "$(dirname -- "$0")/_/husky.sh" npx --no -- commitlint --edit "$1" || { echo "Try \033[1;32mnpx git-cz --disable-emoji\033[0;37m to commit and be align with the conventions or use \033[1;32git commit -m \"yolo!\" --no-verify\033[0;37m to bypass the commit-msg hook."; exit 1; } diff --git a/.husky/post-merge b/.husky/post-merge index 32170ae..8ada77f 100755 --- a/.husky/post-merge +++ b/.husky/post-merge @@ -1,5 +1,5 @@ #!/usr/bin/env sh -. "$(dirname "$0")/_/husky.sh" +. "$(dirname -- "$0")/_/husky.sh" # Install any missing dependencies since package.json changed git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD | grep --quiet package.json && npm install diff --git a/.husky/pre-commit b/.husky/pre-commit index 28cf149..be7e67a 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1,5 @@ #!/usr/bin/env sh -. "$(dirname "$0")/_/husky.sh" +. "$(dirname -- "$0")/_/husky.sh" npx --no lint-staged helm lint chart --strict diff --git a/.husky/pre-push b/.husky/pre-push index 681d0d5..ee3d02c 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,5 +1,5 @@ #!/usr/bin/env sh -. "$(dirname "$0")/_/husky.sh" +. "$(dirname -- "$0")/_/husky.sh" # Due to device performance, the tests are run only on one project and with increased timeout, while the tests stop immediately at the first failure. npm run test -- --project="Desktop Chromium" --timeout=30000 -x