fix(lib): doom/help-packages: handle missing homepage

When a package is added via straight local-repo, no homepage can be
determined. Prevent doom--help-insert-button throwing an error in this
case.
This commit is contained in:
mosquito-magnet 2023-09-06 14:40:07 +02:00 committed by GitHub
parent 0e8f458d99
commit f4e74e17ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -576,7 +576,10 @@ If prefix arg is present, refresh the cache."
(pp-to-string recipe)))) (pp-to-string recipe))))
(package--print-help-section "Homepage") (package--print-help-section "Homepage")
(doom--help-insert-button (doom-package-homepage package))) (let ((homepage (doom-package-homepage package)))
(if homepage
(doom--help-insert-button homepage)
(insert "n/a"))))
(`elpa (insert "[M]ELPA ") (`elpa (insert "[M]ELPA ")
(doom--help-insert-button (doom-package-homepage package)) (doom--help-insert-button (doom-package-homepage package))