Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
just: Use bash to perform install-hook confirmation
Fintan Halpenny committed 23 days ago
commit cf5f8dee5b424db6577fd732a056bc9a1671f0b8
parent 9a034b4394db38ac5e466481022f5b6355db1ab3
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"