mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 04:05:40 +03:00
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
1 changed files with 6 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue