We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44af74f commit 7de557bCopy full SHA for 7de557b
src/tools/install-git-hook/src/pre-commit.sh renamed to src/etc/pre-commit.sh
@@ -1,12 +1,16 @@
1
-#!/bin/sh
+#!/bin/env bash
2
#
3
# Call `tidy --bless` before each commit
4
+# Copy this scripts to .git/hooks to activate,
5
+# and remove it from .git/hooks to deactivate.
6
-# To enable this hook, run `./x.py run install-git-hook`.
-# To disable it, run `./x.py run install-git-hook --remove`
7
+# For help running bash scripts on Windows,
8
+# see https://stackoverflow.com/a/6413405/6894799
9
+#
10
+
11
set -Eeuo pipefail
12
-ROOT_DIR=$(git rev-parse --show-toplevel);
13
+ROOT_DIR="$(git rev-parse --show-toplevel)";
14
COMMAND="$ROOT_DIR/x.py test tidy --bless";
15
16
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
0 commit comments