diff --git a/pkgs/common-updater/combinators.nix b/pkgs/common-updater/combinators.nix index c4754848be87..eafc530ceaed 100644 --- a/pkgs/common-updater/combinators.nix +++ b/pkgs/common-updater/combinators.nix @@ -169,18 +169,21 @@ rec { assert lib.assertMsg (lib.all validateFeatures scripts) "Combining update scripts with features enabled (other than “silent” scripts and an optional single script with “commit”) is currently unsupported."; + assert lib.assertMsg ( builtins.length ( lib.unique ( - builtins.map ( - { - attrPath ? null, - ... - }: - attrPath - ) scripts + builtins.filter (attrPath: attrPath != null) ( + builtins.map ( + { + attrPath ? null, + ... + }: + attrPath + ) scripts + ) ) - ) == 1 + ) <= 1 ) "Combining update scripts with different attr paths is currently unsupported."; {