nixpkgs/nixos/modules/installer
Chuck 84d55716a9 Don't print header on stderr
Automated consumers can use 'sed 1d' or similar to remove this header.

This probably makes this output *easier* to consume correctly.  Having
this header show up in consumers' terminal or log output is probably not
useful, but hiding it without hiding all error messages would have been
more troublesome that just stripping it from stdout.

I.e., previously, unsophisticated use would show undesired output:
  $ some-other-tool
  This attribute set contains:
  This attribute set contains:
  This attribute set contains:
  This attribute set contains:
  <Actual some-other-tool output>

The simplest way to hide this undesired output would have been
nixos-option ... 2>/dev/null, which would hide all error messages.
We do not wish to encourage that.

Correct use would have been something like:
  nixos-option ... 2> >( grep --line-buffered -v 'This attribute set contains:')

After this change, correct use is simpler:
  nixos-option ... | sed 1d
or
  nixos-option ... | sed '1/This attribute set contains:/d'
if the caller don't know if this invocation of nixos-option will yield
an attribute listing or an option description.
2019-11-04 15:11:45 +01:00
..
cd-dvd Merge pull request #46997 from worldofpeace/installer-autorun 2019-10-05 11:34:27 +00:00
netboot treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
scan [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
tools Don't print header on stderr 2019-11-04 15:11:45 +01:00
virtualbox-demo.nix ova: remove stateVersion 2019-03-09 14:25:05 -05:00