maintainers/scripts/update.nix: handle null paths
Previously we did not handle non-existant paths making the program crash. Let’s show a proper error.
This commit is contained in:
parent
36b2012447
commit
c3dd31f177
@ -69,9 +69,12 @@ let
|
|||||||
let
|
let
|
||||||
attrSet = pkgs.lib.attrByPath (pkgs.lib.splitString "." path) null pkgs;
|
attrSet = pkgs.lib.attrByPath (pkgs.lib.splitString "." path) null pkgs;
|
||||||
in
|
in
|
||||||
packagesWith (name: pkg: builtins.hasAttr "updateScript" pkg)
|
if attrSet == null then
|
||||||
(name: pkg: pkg)
|
builtins.throw "Attribute path `${path}` does not exists."
|
||||||
attrSet;
|
else
|
||||||
|
packagesWith (name: pkg: builtins.hasAttr "updateScript" pkg)
|
||||||
|
(name: pkg: pkg)
|
||||||
|
attrSet;
|
||||||
|
|
||||||
packageByName = name:
|
packageByName = name:
|
||||||
let
|
let
|
||||||
|
Loading…
x
Reference in New Issue
Block a user