fix: back up stow conflicts before make install#126
Merged
Conversation
…ailures linkWithMake ran make install without pre-backing-up files that stow (called by the Makefile) would conflict with. The default dotfiles repo's Makefile calls stow directly, so pre-existing .gitconfig/.zshrc on the runner caused make to exit 2, failing all three vm-e2e dotfiles tests. Apply the same backupConflicts loop that linkWithStow already uses: scan each package directory, back up regular-file conflicts, restore on make failure, clean up on success. Also updates the archtest baseline whose line numbers shifted with the added code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Pre-backs-up existing regular files that would conflict with stow before running
make install, mirroring the logic already inlinkWithStow.Why?
The v0.61.0 release workflow failed at the vm-e2e stage:
PR #123 added
linkWithMaketo prefer a Makefile'sinstalltarget over calling stow directly, but didn't carry over thebackupConflictsstep thatlinkWithStowhas always run. The default dotfiles repo'sMakefiledelegates tostow, which aborts on pre-existing files it can't replace. On the vm-e2e runner,.gitconfigand.zshrcexist from earlier installer steps.Testing
go vet ./...passesTestLinkWithMake_BacksUpConflictsBeforeRunningandTestLinkWithMake_RestoresConflictsOnMakeFailure./openboot install --dry-runor similar)Cross-repo checklist
openboot.dev? — NoNotes for reviewer
linkWithMakenow:.openboot.bakbefore runningmake installThis is the same pattern
linkWithStowhas used since the feature landed.