diff options
author | Alex Sassmannshausen <alex@pompo.co> | 2019-04-08 15:18:23 +0100 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2019-11-18 13:18:41 +0900 |
commit | b997d43214445462f23947afbbcadf24c6018217 (patch) | |
tree | e7422952d6bcaa90b4ed0ed78699dbd832735ba0 | |
parent | 9c9982dc0c8c38ce3821b154b7e92509c1564317 (diff) | |
download | patches-b997d43214445462f23947afbbcadf24c6018217.tar patches-b997d43214445462f23947afbbcadf24c6018217.tar.gz |
utils: Handle #f file-name.
* guix/utils.scm (current-source-directory): Change dispatch to handle #f
file-name.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
-rw-r--r-- | guix/utils.scm | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/guix/utils.scm b/guix/utils.scm index 1f99c5b3f5..64853f2989 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -782,13 +782,11 @@ be determined." ;; the absolute file name by looking at %LOAD-PATH; doing this at ;; run time rather than expansion time is necessary to allow files ;; to be moved on the file system. - (cond ((not file-name) - #f) ;raising an error would upset Geiser users - ((string-prefix? "/" file-name) - (dirname file-name)) - (else - #`(absolute-dirname #,file-name)))) - (#f + (if (string-prefix? "/" file-name) + (dirname file-name) + #`(absolute-dirname #,file-name))) + ((or ('filename . #f) #f) + ;; raising an error would upset Geiser users #f)))))) ;; A source location. |