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 21 days ago
commit 6f570cc1de42e392fba08577df4a25b9827d6f3d
parent f8eb86b8feb3832811a07ab148901d408f2257de
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"