]> git.cworth.org Git - nogit/commitdiff
Fix an accidental case of a ".nogit" literal
authorCarl Worth <cworth@cworth.org>
Sun, 5 Jul 2020 18:10:15 +0000 (11:10 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 5 Jul 2020 18:10:15 +0000 (11:10 -0700)
We have the NOGIT_DIR variable to hold the ".nogit" string. Repeating
the string in the error message here set up some fragility if the
variable's value were ever to change in the future.

nogit

diff --git a/nogit b/nogit
index 16cd18f9460024ba770d5fdff27a44a27adcb851..102b8c7a1516295f9022e88d7f80d22d363dd111 100755 (executable)
--- a/nogit
+++ b/nogit
@@ -59,7 +59,7 @@ nogit_clone()
     url="$1"
 
     if [ -e $NOGIT_DIR ]; then
-        echo "Error: .nogit already exists. Cowardly refusing to re-clone."
+        echo "Error: $NOGIT_DIR already exists. Cowardly refusing to re-clone."
         return 1
     fi