1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00
nixpkgs/nixos
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
..
doc nixos/nixos-option: Rewrite in a more suitable language 2019-11-04 15:11:44 +01:00
lib nixos/make-iso9660-image: Fix doc typo 2019-10-18 11:58:28 -07:00
maintainers ec2-amis.nix: add 19.09 amis 2019-10-28 14:04:20 -04:00
modules Don't print header on stderr 2019-11-04 15:11:45 +01:00
tests Merge pull request #68327 from mmilata/moin 2019-11-03 21:36:12 +01:00
COPYING
default.nix
README Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
release-combined.nix nixos.tests.fontconfig-default-fonts: init 2019-09-01 00:09:25 -04:00
release-small.nix
release.nix Merge pull request #68265 from tkerber/rpi4 2019-09-27 14:35:17 -04:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
http://nixos.org/nixos and in the manual in doc/manual.