feat: prefer Makefile over stow when dotfiles repo has install target#123
Merged
Conversation
When ~/.dotfiles contains a Makefile with an install target, run `make install` instead of invoking stow directly. This lets the dotfiles repo own its own deployment logic (directory pre-creation, stow flags, etc.) without requiring OpenBoot to know app-specific details. Priority order: Makefile → stow packages → direct symlinks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
exec.Command in internal/dotfiles violated the no-direct-exec archtest rule. Add system.RunCommandInDir (mirrors RunCommand but sets cmd.Dir) and use it in linkWithMake. Refresh archtest baselines for the two pre-existing exemptions whose line numbers shifted.
Bare error return was inconsistent with the project convention (fmt.Errorf wrapping) and linkWithStow's error pattern.
Adding 3 lines to linkWithMake shifted the two pre-existing exec.Command exemptions in dotfiles.go; update line numbers in no-direct-exec baseline.
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.
Summary
~/.dotfilescontains aMakefilewith aninstall:target, runmake installinstead of invokingstowdirectly.system.RunCommandInDirtointernal/systemsolinkWithMakegoes through the project's subprocess wrapper instead of callingexec.Commanddirectly (archtest compliance).Test plan
TestHasMakefile_WithInstallTarget— detectsinstall:target correctlyTestHasMakefile_WithoutInstallTarget— ignores Makefiles withoutinstall:TestHasMakefile_NoMakefile— handles missing MakefileTestLinkWithMake_DryRun— dry-run path emits message and returns nilTestLink_UsesMakefileOverStow— Makefile wins when both Makefile and stow package existmake test-unitpasses (including archtestno-direct-exec)