]> git.ekhem.eu.org Git - guix.git/commitdiff
[scripts] Derive main project from worktree path in merge-worktree.
authorJakub Czajka <jakub@ekhem.eu.org>
Fri, 24 Jul 2026 09:03:21 +0000 (09:03 +0000)
committerJakub Czajka <jakub@ekhem.eu.org>
Wed, 29 Jul 2026 10:48:11 +0000 (10:48 +0000)
.claude/scripts/merge-worktree
.claude/settings.json

index 3561f1e24597f14691170517a4a2bd511ad7efcb..c88081bcc2b0c006f4b43227c7e4ce9560dbe2cf 100755 (executable)
@@ -6,7 +6,7 @@
 
 set -o errexit -o nounset
 
-PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
+PROJECT_DIR="$(echo "$PWD" | sed 's|/\.claude/worktrees/.*||')"
 
 # Absolute paths to Guix profile directories, avoiding $PATH lookup.
 GUIX_PROFILE="$HOME/.guix-profile"
index f9249f50e5de002ad952d67dc8d95633884e0632..6bd7704f1d324100f8d042a8d1589fc962c1525b 100644 (file)
@@ -1,5 +1,6 @@
 {
   "env": {
+    "CLAUDE_PROJECT_DIR": "$PWD",
     "GUIX_BIN": "/run/current-system/profile/bin",
     "PROFILE": "nonfree"
   },