1
0
Fork 0
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:
Robert Hensing 2024-05-20 15:15:13 +02:00 committed by GitHub
commit e4be8abe42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 42 additions and 8 deletions

View 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'
{ }
```