nix icon indicating copy to clipboard operation
nix copied to clipboard

nix-build --help fails with invalid nix.conf

Open abathur opened this issue 3 years ago • 1 comments

It looks like nix-build's help flag can't be used without a valid config (even though the message for an invalid config tells you to check the help). Clipping original comment below:


... I'm now receiving the following error after entering nix-build -A plutus-playground.server:

error: illegal configuration line 'https://cache.nixos.org/' in '/etc/nix/nix.conf'
Try 'nix-build --help' for more information.

And running nix-build --help produces the same result:

error: illegal configuration line 'https://cache.nixos.org/' in '/etc/nix/nix.conf'
Try 'nix-build --help' for more information.

Originally posted by @Dave-Lindberg in https://github.com/NixOS/nix/issues/6876#issuecomment-1207138311

abathur avatar Aug 06 '22 14:08 abathur

Bit silly indeed… Making nix --help work with an invalid config would probably be a bit of a pain, but it should be fairly easy to just change the message to redirect to man nix.conf in that case

thufschmitt avatar Aug 09 '22 07:08 thufschmitt