mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Merge pull request #10701 from cole-h/nix-command-warn-unknown-settings
Warn on unknown settings when the first positional is an argument
This commit is contained in:
commit
e4be8abe42
4 changed files with 42 additions and 8 deletions
28
doc/manual/rl-next/fix-silent-unknown-options
Normal file
28
doc/manual/rl-next/fix-silent-unknown-options
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
synopsis: Warn on unknown settings anywhere in the command line
|
||||
prs: 10701
|
||||
---
|
||||
|
||||
All `nix` commands will now properly warn when an unknown option is specified anywhere in the command line.
|
||||
|
||||
Before:
|
||||
|
||||
```console
|
||||
$ nix-instantiate --option foobar baz --expr '{}'
|
||||
warning: unknown setting 'foobar'
|
||||
$ nix-instantiate '{}' --option foobar baz --expr
|
||||
$ nix eval --expr '{}' --option foobar baz
|
||||
{ }
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
```console
|
||||
$ nix-instantiate --option foobar baz --expr '{}'
|
||||
warning: unknown setting 'foobar'
|
||||
$ nix-instantiate '{}' --option foobar baz --expr
|
||||
warning: unknown setting 'foobar'
|
||||
$ nix eval --expr '{}' --option foobar baz
|
||||
warning: unknown setting 'foobar'
|
||||
{ }
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue