-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libutil/args: warn on unknown settings after parsing all flags
- Loading branch information
Showing
2 changed files
with
29 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' | ||
{ } | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters