Skip to content

Commit

Permalink
Failing test 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
gabyx committed Oct 9, 2020
1 parent 1cb6bf0 commit 452c197
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/step-120.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
# Test:
# Custom install prefix test

TEST_PREFIX_DIR="/tmp/githooks"
mkdir -p ~/.githooks/release && cp /var/lib/githooks/cli.sh ~/.githooks/release || exit 1

rm -rf /usr/share/git-core/templates/hooks || exit 1

sh /var/lib/githooks/install.sh --non-interactive --prefix "$TEST_PREFIX_DIR" || exit 1

if [ "$(id -u)" != "0" ]; then
echo "! Test needs root access."
exit 249
fi

if echo "$EXTRA_INSTALL_ARGS" | grep -q "use-core-hookspath"; then
if [ -n "$(git config init.templateDir)" ]; then
echo "! Expected to have init.templateDir not set!" >&2
exit 1
fi
fi

0 comments on commit 452c197

Please sign in to comment.