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:
parent
34fed993f1
commit
7de0c651b7
1 changed files with 5 additions and 1 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Reference in a new issue