Skip to content

Commit

Permalink
ci: updated husky hooks install
Browse files Browse the repository at this point in the history
  • Loading branch information
andreszorro committed Mar 7, 2024
1 parent c3b3d7c commit 2d05770
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test:dev": "bun test --watch",
"test": "bun test",
"test:ci": "bun test --coverage",
"postinstall": "husky install"
"postinstall": "scripts/install-git-hooks.sh"
},
"trustedDependencies": ["."],
"type": "module",
Expand Down
10 changes: 10 additions & 0 deletions scripts/install-git-hooks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/env sh

if sh -c ": >/dev/tty" >/dev/null 2>/dev/null; then
# /dev/tty is available and usable
echo "Installing Husky hooks"
bun husky install
else
# /dev/tty is not available
echo "Ignoring Husky hook install"
fi

0 comments on commit 2d05770

Please sign in to comment.