_experimental-update-script-combinators.sequence: Loosen attrPath constraint
We only allow a single value for `attrPath` across all sequenced update scripts. But previously `null` (representing `passthru.updateScript.attrPath` not being defined) was counted as one value. This would prevent us from explicitly specifying `attrPath` in `gnome.updateScript` in the next commit. Let’s ignore update scripts without specified `attrPath` attribute for the purpose of this check.
This commit is contained in:
parent
f54d20c3a1
commit
6403eb8f4b
@ -169,18 +169,21 @@ rec {
|
|||||||
|
|
||||||
assert lib.assertMsg (lib.all validateFeatures scripts)
|
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.";
|
"Combining update scripts with features enabled (other than “silent” scripts and an optional single script with “commit”) is currently unsupported.";
|
||||||
|
|
||||||
assert lib.assertMsg (
|
assert lib.assertMsg (
|
||||||
builtins.length (
|
builtins.length (
|
||||||
lib.unique (
|
lib.unique (
|
||||||
builtins.map (
|
builtins.filter (attrPath: attrPath != null) (
|
||||||
{
|
builtins.map (
|
||||||
attrPath ? null,
|
{
|
||||||
...
|
attrPath ? null,
|
||||||
}:
|
...
|
||||||
attrPath
|
}:
|
||||||
) scripts
|
attrPath
|
||||||
|
) scripts
|
||||||
|
)
|
||||||
)
|
)
|
||||||
) == 1
|
) <= 1
|
||||||
) "Combining update scripts with different attr paths is currently unsupported.";
|
) "Combining update scripts with different attr paths is currently unsupported.";
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user