Skip to content

Add a run-level warnings/caveats file for deferred or failed steps #30

Description

@jdevera

Found during the fresh-macOS install documented in #20.

Motivation

The fresh-install run produced several situations where a step couldn't fully complete but the right behaviour is to keep going and tell the user to do something later — not to abort. Today those notices either kill the run (dot::step::fatal) or scroll past and get lost.

Proposal

Introduce a run-level warnings/caveats mechanism (conceptually like Homebrew's "Caveats"): a file that any chezmoi script can append to during a run, surfaced as a summary at the very end of chezmoi apply / init.

Use cases that motivated this:

Sketch of behaviour

  • A helper in home/.chezmoitemplates/dotfiles_bashlib.sh, e.g. dot::warn_later "message", appends to a known file (e.g. ${XDG_STATE_HOME}/dotfiles/run-warnings).
  • The file is reset at the start of a run.
  • At the end of the run, if non-empty, print a clearly delimited "Caveats / things to finish" block.

This pairs with the hishtory robustness work and the Homebrew-sudo issue, which should write to it instead of failing hard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementGeneral flow / quality-of-life improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions