Skip to content

starship.toml rule has no prerequisite and an unreachable fallback #75

Description

@SebastienElet

~/.config/starship.toml is the only deployment rule in the Makefile that does not depend on its
own source, and its fallback branch cannot be reached.

Evidence

Makefile:704-711:

~/.config/starship.toml: | ~/.config
	@if [ -f ${DOTFILES_PATH}/.config/starship.toml ]; then \
		ln -sf ${DOTFILES_PATH}/.config/starship.toml $@; \
		echo "Created starship.toml symlink"; \
	else \
		echo "Skipping starship.toml symlink: source file ${DOTFILES_PATH}/.config/starship.toml not found"; \
		touch $@; \
	fi

Two defects:

  1. No prerequisite on the source. Every other link rule declares it — Makefile:146, 319,
    663, 688, 694, 716 all follow ~/x: ${DOTFILES_PATH}/x. Here the source appears only
    inside the recipe, so make cannot know the target is out of date when the source changes.
    .config/starship.toml is tracked (44 lines), so the -f test is answering a question that has
    only one possible answer.

  2. The else branch would install a broken configuration. touch $@ creates an empty
    ~/.config/starship.toml, and starship reads an empty file as "no configuration" rather than
    falling back to its defaults — the prompt silently loses everything in
    .config/starship.toml:1-44. A missing source should fail the target, not fabricate a placeholder
    that looks like success. This is the failure mode .agents/skills/enforcement-code exists to
    prevent: a guard that reports completion after doing the wrong thing.

Fix

Reduce it to the shape every neighbouring rule uses:

~/.config/starship.toml: ${DOTFILES_PATH}/.config/starship.toml | ~/.config
	ln -s $< $@

If the source is ever missing, make stops with "No rule to make target", which is the correct
outcome.

Verification

touch .config/starship.toml && make -n ~/.config/starship.toml must show the ln; running it
twice in a row must show it once.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions