Skip to content

Commit d904d70

Browse files
authored
Fix error and silent failure in Git hooks install script (#3914)
1 parent 02a7485 commit d904d70

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.githooks/install

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
cd $(git rev-parse --git-dir)
44

55
echo "Installing hooks..."
6-
ln -s ../.githooks hooks
7-
echo "Done!"
6+
ln -sT ../.githooks hooks
7+
if [ $? -eq 0 ]; then
8+
echo "Done!"
9+
else
10+
echo "Hooks failed to install: .git/hooks already exists or cannot be created"
11+
fi

0 commit comments

Comments
 (0)