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.
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:
…later to register." (see hishtory: pre-flight remote reachability check with offline fallback (don't abort the run) #28)Sketch of behaviour
home/.chezmoitemplates/dotfiles_bashlib.sh, e.g.dot::warn_later "message", appends to a known file (e.g.${XDG_STATE_HOME}/dotfiles/run-warnings).This pairs with the hishtory robustness work and the Homebrew-sudo issue, which should write to it instead of failing hard.