guix-commits
[Top][All Lists]
Advanced

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

branch master updated: gexp: 'assume-valid-file-name' has files looked u


From: guix-commits
Subject: branch master updated: gexp: 'assume-valid-file-name' has files looked up under the CWD.
Date: Sat, 17 Oct 2020 18:24:16 -0400

This is an automated email from the git hooks/post-receive script.

civodul pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 6be7146  gexp: 'assume-valid-file-name' has files looked up under the 
CWD.
6be7146 is described below

commit 6be71461309bad19dcd96faa151ca691d87f28df
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Oct 18 00:21:33 2020 +0200

    gexp: 'assume-valid-file-name' has files looked up under the CWD.
    
    Fixes a bug introduced in 5d4ad8e1be6d60c38577e2f3d92cc5642b12eff0,
    whereby files enclosed in 'assume-valid-file-name' would be looked up
    relative to the source directory instead of relative to the current
    directory.
    
    * guix/gexp.scm (local-file): In the 'assume-valid-file-name' case, look
    up FILE relative to the current working directory.
---
 guix/gexp.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guix/gexp.scm b/guix/gexp.scm
index 76fffc4..9339b22 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -457,11 +457,11 @@ appears."
                       (delay (absolute-file-name file 
(current-source-directory)))
                       rest ...))
       ((_ (assume-valid-file-name file) rest ...)
-       ;; FILE is not a literal, so resolve it relative to the source
+       ;; FILE is not a literal, so resolve it relative to the current
        ;; directory.  Since the user declared FILE is valid, do not pass
        ;; #:literal? #f so that we do not warn about it later on.
        #'(%local-file file
-                      (delay (absolute-file-name file 
(current-source-directory)))
+                      (delay (absolute-file-name file (getcwd)))
                       rest ...))
       ((_ file rest ...)
        ;; Resolve FILE relative to the current directory.



reply via email to

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