[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: scripts: edit: Fix relative file-name with 'load-
From: |
guix-commits |
Subject: |
branch master updated: scripts: edit: Fix relative file-name with 'load-path' option. |
Date: |
Sun, 05 Nov 2023 10:50:26 -0500 |
This is an automated email from the git hooks/post-receive script.
zimoun pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 1eb3133355 scripts: edit: Fix relative file-name with 'load-path'
option.
1eb3133355 is described below
commit 1eb3133355ef14d6d4c8648504a7e013338779a8
Author: Simon Tournier <zimon.toutoune@gmail.com>
AuthorDate: Thu Nov 2 21:25:43 2023 +0100
scripts: edit: Fix relative file-name with 'load-path' option.
* guix/scripts/edit.scm (search-path*): Return 'file' if exists when
'search-path' fails.
Change-Id: I891d63d0d28577a7d1732fc59435828ecc0a5c5a
---
guix/scripts/edit.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/guix/scripts/edit.scm b/guix/scripts/edit.scm
index ff2d529bcf..b7b4cd2514 100644
--- a/guix/scripts/edit.scm
+++ b/guix/scripts/edit.scm
@@ -64,7 +64,11 @@ Start $VISUAL or $EDITOR to edit the definitions of
PACKAGE...\n"))
(define (search-path* path file)
"Like 'search-path' but exit if FILE is not found."
- (let ((absolute-file-name (search-path path file)))
+ (let ((absolute-file-name (or (search-path path file)
+ ;; It could be that FILE is a relative name
+ ;; i.e., not relative to an element of PATH.
+ (and (file-exists? file)
+ file))))
(unless absolute-file-name
;; Shouldn't happen unless somebody fiddled with the 'location' field.
(leave (G_ "file '~a' not found in search path ~s~%")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: scripts: edit: Fix relative file-name with 'load-path' option.,
guix-commits <=