* [bug#45953] [PATCH] environment: fix --root option with relative path
@ 2021-01-18 8:26 guix-patches--- via
2021-01-19 17:16 ` bug#45953: " Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: guix-patches--- via @ 2021-01-18 8:26 UTC (permalink / raw)
To: 45953
The path normalization of `--root` option of `guix environment` was
buggy as it appended full argument after normalized directory. This
patch fixes it.
* guix/scripts/environment.scm: fix gc-root path normalization
Signed-off-by: Francois Joulaud <francois.joulaud@radiofrance.com>
---
guix/scripts/environment.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index fbc202c658..f4d12f89bf 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -675,7 +675,7 @@ message if any test fails."
(let* ((root (if (string-prefix? "/" root)
root
(string-append (canonicalize-path (dirname root))
- "/" root))))
+ "/" (basename root)))))
(catch 'system-error
(lambda ()
(symlink target root)
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-19 17:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 8:26 [bug#45953] [PATCH] environment: fix --root option with relative path guix-patches--- via
2021-01-19 17:16 ` bug#45953: " Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).