rebuild-nexus: print evaluation warnings once, not twice #62
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/nexus#62
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
rebuild-nexusprints every Home Manager evaluation warning twice: once from its ownnix evalof the toplevel, and again whennixos-rebuildevaluates the same attribute. On a host whose profile emits a dozen warnings, the first wall lands between theAttribute:andToplevel:lines, which is exactly where the preview the script exists to show should be easy to read.Capture the eval's stderr and print it only when the eval fails. On success the same warnings arrive from
nixos-rebuildmoments later, so nothing is lost; on failure the operator still sees the full error. TheFlake:,Attribute:andToplevel:lines should then print as three adjacent lines.Validation
tests/rebuild-nexus.sh: with anixstub that writes a warning to stderr and succeeds, the script's output contains the three preview lines and not the warning; with a stub that writes to stderr and fails, the script exits non-zero, the stderr text appears in its output, and the recorder is not invoked.Scope
In:
scripts/rebuild-nexus, its test. Out: the warnings themselves, which are fixed in archetypes and profiles.Refs allod/nexus#59.