fix: Conditionally set GOFLAGS for git worktrees#1986
Conversation
Automatically detect git worktrees and set GOFLAGS="-buildvcs=false" to prevent build failures when the VCS metadata is in a different location. Non-worktree repos are unaffected. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe Makefile now detects when the build is running within a Git worktree and automatically sets the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1986 +/- ##
==========================================
- Coverage 74.93% 74.91% -0.02%
==========================================
Files 777 777
Lines 71302 71302
==========================================
- Hits 53428 53417 -11
- Misses 14394 14406 +12
+ Partials 3480 3479 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
These changes were released in v1.204.1-rc.2. |
what
Automatically detect git worktrees and set
GOFLAGS="-buildvcs=false"to prevent build failures. In worktrees, the.gitdirectory is in a different location (.git/worktrees/<name>), causing the VCS build metadata to fail unless explicitly disabled.why
Developers using git worktrees were experiencing build failures or unexpected behavior. This change makes the build process worktree-aware without affecting non-worktree repositories.
references
Related to git worktree development workflow improvements.
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.