1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2025-04-16 01:06:49 +00:00

raise error when flake attribute doesn't exist

Currently when trying to access packages from input flakes for a system that isn't supported by that flake, the error is not very conclusive.
It costed me at least an hour to grasp this. Now putting in this error message to prevent others from falling into the same trap.
This commit is contained in:
DavHau 2023-12-10 20:07:51 +07:00
parent 34fed993f1
commit 7de0c651b7

View file

@ -67,7 +67,11 @@ in
perInput =
system: flake:
mapAttrs
(attrName: attrConfig: flake.${attrName}.${system})
(attrName: attrConfig:
flake.${attrName}.${system} or (throw ''
Attemt to access non existent attribute ${attrName}.${system} of flake ${flake}.
'')
)
config.transposition;
perSystem = {