mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 20:49:29 -05:00
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
1 changed files with 4 additions and 4 deletions
|
@ -363,12 +363,12 @@ (define (goto port line column)
|
|||
(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 a new issue