--- Begin Message ---
Subject: |
[PATCH] environment: fix --root option with relative path |
Date: |
Mon, 18 Jan 2021 08:26:02 +0000 |
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
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#45953: [PATCH] environment: fix --root option with relative path |
Date: |
Tue, 19 Jan 2021 18:16:53 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi,
JOULAUD François <Francois.JOULAUD@radiofrance.com> skribis:
> 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
Good catch! I added a test, tweaked the commit log, and pushed:
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=4d79f072cc7b502fc25486d514c9200ba684a596
Thanks,
Ludo’.
--- End Message ---