packages: 'package-field-location' handles missing source properties.
This is a followup to f2b24f01f4
.
* guix/packages.scm (package-field-location): Check whether
'source-properties->location' returns #f. This fixes the case where
'source-properties' returns the empty list.
This commit is contained in:
parent
3e6f65be7a
commit
91601790d0
@ -363,12 +363,12 @@ object."
|
||||
(let ((field (assoc field inits)))
|
||||
(match field
|
||||
((_ value)
|
||||
(let ((props (source-properties value)))
|
||||
(and props
|
||||
(let ((loc (and=> (source-properties value)
|
||||
source-properties->location)))
|
||||
(and loc
|
||||
;; Preserve the original file name, which may be a
|
||||
;; relative file name.
|
||||
(let ((loc (source-properties->location props)))
|
||||
(set-field loc (location-file) file)))))
|
||||
(set-field loc (location-file) file))))
|
||||
(_
|
||||
#f))))
|
||||
(_
|
||||
|
Loading…
Reference in New Issue
Block a user