Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
just: Use bash to perform install-hook confirmation
Fintan Halpenny committed 13 days ago
commit 69ccabacdd76c1c6e132707ab887a96a61781965
parent 1f4de60
1 file changed +2 -1
modified justfile
@@ -148,10 +148,11 @@ verify-tool tool package_name="":
#
# Install git hooks
[group('hooks')]
-
[confirm("Overwrite existing hooks '" + hooks + "'?")]
install-hooks:
    #!/usr/bin/env bash
    set -e
+
    read -p "Overwrite existing hooks '{{hooks}}'? [y/N] " confirm
+
    [[ "$confirm" == "y" ]] || exit 1
    for hook in {{hooks}}; do
        if [ -f ".git/hooks/$hook" ]; then
          rm ".git/hooks/$hook"