]> git.newer.systems Git - TuCLS.git/commitdiff
stow-bug main
authorTucker Johnson <tucker@newer.systems>
Fri, 14 Aug 2026 19:30:21 +0000 (15:30 -0400)
committerTucker Johnson <tucker@newer.systems>
Fri, 14 Aug 2026 19:30:21 +0000 (15:30 -0400)
tucls.sh

index 1731ac8a82ba1c3c8d2c42c249ba1ff1d1bd8963..f95ccf048b013735990e29dd7f73f39154ce9ff3 100755 (executable)
--- a/tucls.sh
+++ b/tucls.sh
@@ -175,7 +175,12 @@ cloneandstow() {
        sudo -u "$name" git -C "$repodir" clone -q "$1" "$dir" 2>/dev/null ||
                { cd "$dir" || return 1; sudo -u "$name" git pull --force origin master 2>/dev/null || return 1; }
        cd "$repodir" || return 1
        sudo -u "$name" git -C "$repodir" clone -q "$1" "$dir" 2>/dev/null ||
                { cd "$dir" || return 1; sudo -u "$name" git pull --force origin master 2>/dev/null || return 1; }
        cd "$repodir" || return 1
-       sudo -u "$name" stow -t "/home/$name" "$progname"
+       # --no-folding: without this, stow will collapse an entire empty target
+       # directory (e.g. ~/.local/bin) into a single symlink into this repo
+       # instead of symlinking the files inside it individually. That breaks
+       # anything else that writes into the same directory later (e.g. pipx,
+       # npm) by making it write straight into the git working tree.
+       sudo -u "$name" stow --no-folding -t "/home/$name" "$progname"
        [ -f "$dir/Makefile" ] && { cd "$dir" || return 1; make install >/dev/null 2>&1; }
        cd /tmp || return 1
 }
        [ -f "$dir/Makefile" ] && { cd "$dir" || return 1; make install >/dev/null 2>&1; }
        cd /tmp || return 1
 }