Please find attached a patch for handling #f file-name.

Alex
>From e6f7d9c4dbbf89284455d6a05488ab952d5374a4 Mon Sep 17 00:00:00 2001
From: Alex Sassmannshausen <a...@pompo.co>
Date: Mon, 8 Apr 2019 15:18:23 +0100
Subject: [PATCH] utils: Handle #f file-name.

* guix/utils.scm (current-source-directory): Change dispatch to handle #f
  file-name.
---
 guix/utils.scm | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/guix/utils.scm b/guix/utils.scm
index ed1a418cca..12765650d8 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -758,13 +758,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.
-- 
2.21.0

Reply via email to