Expand :local-repo relative to containing file

This commit is contained in:
Henrik Lissner 2019-12-26 02:40:56 -05:00
parent 934e4fc06f
commit c1ff03ebed
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -334,10 +334,16 @@ elsewhere."
(plist-put! plist prop val))) (plist-put! plist prop val)))
;; Some basic key validation; error if you're not using a valid key ;; Some basic key validation; error if you're not using a valid key
(condition-case e (condition-case e
(cl-destructuring-bind (when-let (recipe (plist-get plist :recipe))
(&key _local-repo _files _flavor _no-build (cl-destructuring-bind
_type _repo _host _branch _remote _nonrecursive _fork _depth) (&key local-repo _files _flavor _no-build
(plist-get plist :recipe)) _type _repo _host _branch _remote _nonrecursive _fork _depth)
recipe
;; Expand :local-repo from current directory
(when local-repo
(plist-put! plist :recipe
(plist-put recipe :local-repo
(expand-file-name local-repo ,(dir!)))))))
(error (error
(signal 'doom-package-error (signal 'doom-package-error
(cons ,(symbol-name name) (cons ,(symbol-name name)