Merge pull request #133508 from Infinisil/toPretty-no-drvPath

lib.generators: Handle no drvPath in toPretty
This commit is contained in:
Robert Hensing 2021-08-13 12:14:44 +02:00 committed by GitHub
commit 38819cd2f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -248,7 +248,7 @@ rec {
then v.__pretty v.val
else if v == {} then "{ }"
else if v ? type && v.type == "derivation" then
"<derivation ${v.drvPath}>"
"<derivation ${v.drvPath or "???"}>"
else "{" + introSpace
+ libStr.concatStringsSep introSpace (libAttr.mapAttrsToList
(name: value: