All checks were successful
CI / check (push) Successful in 3m37s
Replace inline postPatch substituteInPlace calls with proper unified diff patch files, following the pattern established by beads. This improves maintainability: - Each patch is in its own file with clear naming - Patches use proper unified diff format - Easier to review, update, and track individual fixes - Default.nix is cleaner (237 lines of substituteInPlace -> 15 lines) Patches included: - gastown-fix-validate-recipient.patch - gastown-fix-agent-bead-address-title.patch - gastown-fix-agent-bead-rig-prefix.patch - gastown-fix-role-home-paths.patch - gastown-fix-town-root-detection.patch - gastown-fix-copydir-symlinks.patch - gastown-statusline-optimization.patch Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
26 lines
696 B
Diff
26 lines
696 B
Diff
diff --git a/internal/git/git.go b/internal/git/git.go
|
|
index 0000000..1111111 100644
|
|
--- a/internal/git/git.go
|
|
+++ b/internal/git/git.go
|
|
@@ -73,7 +73,18 @@ func copyDir(src, dest string) error {
|
|
srcPath := filepath.Join(src, entry.Name())
|
|
destPath := filepath.Join(dest, entry.Name())
|
|
|
|
- if entry.IsDir() {
|
|
+ // Handle symlinks (recreate them, do not follow)
|
|
+ if entry.Type()&os.ModeSymlink != 0 {
|
|
+ linkTarget, err := os.Readlink(srcPath)
|
|
+ if err != nil {
|
|
+ return err
|
|
+ }
|
|
+ if err := os.Symlink(linkTarget, destPath); err != nil {
|
|
+ return err
|
|
+ }
|
|
+ continue
|
|
+ }
|
|
+
|
|
+ if entry.IsDir() {
|
|
if err := copyDir(srcPath, destPath); err != nil {
|
|
return err
|
|
}
|