guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: utils: 'current-source-directory' gracefully deals with lack of l


From: Ludovic Courtès
Subject: 01/03: utils: 'current-source-directory' gracefully deals with lack of location info.
Date: Tue, 19 Sep 2017 06:19:22 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 82781d871f8753737448c562b3906b2a7f89581c
Author: Ludovic Courtès <address@hidden>
Date:   Mon Sep 18 17:00:17 2017 +0200

    utils: 'current-source-directory' gracefully deals with lack of location 
info.
    
    * guix/utils.scm (current-source-directory): Adjust for when
    'syntax-source' returns #f.
---
 guix/utils.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guix/utils.scm b/guix/utils.scm
index ab43ed4..8fbbdc3 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -700,7 +700,7 @@ failure."
 be determined."
     (syntax-case s ()
       ((_)
-       (match (assq 'filename (syntax-source s))
+       (match (assq 'filename (or (syntax-source s) '()))
          (('filename . (? string? file-name))
           ;; If %FILE-PORT-NAME-CANONICALIZATION is 'relative, then FILE-NAME
           ;; can be relative.  In that case, we try to find out at run time
@@ -713,7 +713,7 @@ be determined."
                  (dirname file-name))
                 (else
                  #`(absolute-dirname #,file-name))))
-         (_
+         (#f
           #f))))))
 
 ;; A source location.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]