hive-priv: filter/trim before counting output-path lines, fix log level
This commit is contained in:
parent
40db6c8987
commit
b35063cf46
2 changed files with 67 additions and 26 deletions
|
|
@ -82,8 +82,11 @@ the end — forwarding it the same way would risk interleaving a progress
|
|||
line into the value this function hands back as `--system-path`, trading
|
||||
a closure-mixup bug for a corrupted-argument one. So stdout lines are
|
||||
accumulated silently and only consulted after the exit status is known
|
||||
to be success — and even then, exactly one line is required (`nix build
|
||||
--print-out-paths` prints one line *per output*, not one line total;
|
||||
`config.system.build.toplevel` is single-output today, but a bare
|
||||
`.trim()` would silently hand a multi-line string to `--system-path` the
|
||||
day that ever changes, so a wrong line count `bail!`s instead).
|
||||
to be success — and even then, exactly one non-empty, trimmed line is
|
||||
required (`nix build --print-out-paths` prints one line *per output*,
|
||||
not one line total; `config.system.build.toplevel` is single-output
|
||||
today, but a bare whole-buffer `.trim()` would silently hand a
|
||||
multi-line string to `--system-path` the day that ever changes, and a
|
||||
bare untrimmed/unfiltered `.lines()` turns a lone `"\n"` into a bogus
|
||||
empty-string "path" — a wrong line count, or a blank/whitespace one,
|
||||
`bail!`s instead).
|
||||
|
|
|
|||
Loading…
Reference in a new issue