From f35a61d8a64cc32b6ef7576038dcce0ae63d5b50 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sat, 5 Oct 2024 14:10:14 +0000 Subject: [PATCH] lib.modules: fix test line using empty "$@" Probably a missed left over from somewhere in the commit 58f385f68005a6fed7b526ee2c19fef11d87038c. As can be seen in that commit where this line was introduced, "$@" was also just emptied by the last `set` call in line 169. This line is currently valid, but breaks suddenly when somewhere earlier a `set --` instruction is used in the future. Neither in commit 58f385f68005a6fed7b526ee2c19fef11d87038c nor in PR https://github.com/NixOS/nixpkgs/pull/197547 have I found anything stating that this "defect" was intentional. --- lib/tests/modules.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 999e105f4a27e..ad2ea44c361a4 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -535,7 +535,7 @@ checkConfigError 'A submoduleWith option is declared multiple times with conflic # _type check checkConfigError 'Expected a module, but found a value of type .*"flake".*, while trying to load a module into .*/module-imports-_type-check.nix' config.ok.config ./module-imports-_type-check.nix -checkConfigOutput '^true$' "$@" config.enable ./declare-enable.nix ./define-enable-with-top-level-mkIf.nix +checkConfigOutput '^true$' config.enable ./declare-enable.nix ./define-enable-with-top-level-mkIf.nix checkConfigError 'Expected a module, but found a value of type .*"configuration".*, while trying to load a module into .*/import-configuration.nix.' config ./import-configuration.nix checkConfigError 'please only import the modules that make up the configuration' config ./import-configuration.nix