From 031d92411637904a8ed759dc80bc474213dd4fa9 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Tue, 14 May 2024 12:13:40 -0700 Subject: libutil/args: warn on unknown settings after parsing all flags Upstream change: https://github.com/NixOS/nix/pull/10701 Change-Id: Icf271df57ec529dd8c64667d1ef9f6dbf02d33d3 --- doc/manual/rl-next/fix-silent-unknown-options.md | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 doc/manual/rl-next/fix-silent-unknown-options.md (limited to 'doc/manual/rl-next') diff --git a/doc/manual/rl-next/fix-silent-unknown-options.md b/doc/manual/rl-next/fix-silent-unknown-options.md new file mode 100644 index 000000000..679cc26e8 --- /dev/null +++ b/doc/manual/rl-next/fix-silent-unknown-options.md @@ -0,0 +1,30 @@ +--- +synopsis: Warn on unknown settings anywhere in the command line +prs: 10701 +credits: [cole-h] +category: Improvements +--- + +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' +{ } +``` -- cgit v1.2.3