Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
just: Check for file before removing in install-hooks
Fintan Halpenny committed 13 days ago
commit 11e80d309412b06d460280cac5a1619dae6bfafb
parent a74befd
1 file changed +3 -1
modified justfile
@@ -153,7 +153,9 @@ install-hooks:
    #!/usr/bin/env bash
    set -e
    for hook in {{hooks}}; do
-
        rm ".git/hooks/$hook"
+
        if [ -f ".git/hooks/$hook" ]; then
+
          rm ".git/hooks/$hook"
+
        fi
        cp {{hook-script}} ".git/hooks/$hook"
        chmod +x ".git/hooks/$hook"
    done