mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-25 15:07:06 -04:00
chore(git): skip hooks if runner isn't found
This commit is contained in:
@@ -1 +1,14 @@
|
||||
pnpm commitlint --edit --config=commitlint.config.cjs
|
||||
#! /usr/bin/env sh
|
||||
set -o errexit -o nounset
|
||||
|
||||
runner=$(
|
||||
command -v pnpm ||
|
||||
command -v npm ||
|
||||
true
|
||||
)
|
||||
|
||||
if [ -n "$runner" ]; then
|
||||
exec "$runner" commitlint --edit --config=commitlint.config.cjs
|
||||
else
|
||||
echo 'Neither pnpm nor npm was found. Skip linting.' >&2
|
||||
fi
|
||||
|
||||
@@ -1 +1,14 @@
|
||||
pnpm run lint --quiet
|
||||
#! /usr/bin/env sh
|
||||
set -o errexit -o nounset
|
||||
|
||||
runner=$(
|
||||
command -v pnpm ||
|
||||
command -v npm ||
|
||||
true
|
||||
)
|
||||
|
||||
if [ -n "$runner" ]; then
|
||||
exec "$runner" run lint --quiet
|
||||
else
|
||||
echo 'Neither pnpm nor npm was found. Skip linting.' >&2
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user