Skip to content

feat: prefer Makefile over stow when dotfiles repo has install target#123

Merged
fullstackjam merged 4 commits into
mainfrom
feat/prefer-makefile-over-stow
Jun 2, 2026
Merged

feat: prefer Makefile over stow when dotfiles repo has install target#123
fullstackjam merged 4 commits into
mainfrom
feat/prefer-makefile-over-stow

Conversation

@fullstackjam
Copy link
Copy Markdown
Collaborator

Summary

  • When ~/.dotfiles contains a Makefile with an install: target, run make install instead of invoking stow directly.
  • Priority order is now: Makefile → stow packages → direct symlinks.
  • This lets the dotfiles repo own its own deployment logic (directory pre-creation, custom stow flags, etc.) without requiring OpenBoot to know app-specific details.
  • Added system.RunCommandInDir to internal/system so linkWithMake goes through the project's subprocess wrapper instead of calling exec.Command directly (archtest compliance).

Test plan

  • TestHasMakefile_WithInstallTarget — detects install: target correctly
  • TestHasMakefile_WithoutInstallTarget — ignores Makefiles without install:
  • TestHasMakefile_NoMakefile — handles missing Makefile
  • TestLinkWithMake_DryRun — dry-run path emits message and returns nil
  • TestLink_UsesMakefileOverStow — Makefile wins when both Makefile and stow package exist
  • make test-unit passes (including archtest no-direct-exec)

fullstackjam and others added 2 commits June 2, 2026 23:10
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.
@github-actions github-actions Bot added the tests Tests only label Jun 2, 2026
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.
@fullstackjam fullstackjam merged commit 7ba9e65 into main Jun 2, 2026
11 checks passed
@fullstackjam fullstackjam deleted the feat/prefer-makefile-over-stow branch June 2, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant