unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [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

* bug#45953: [PATCH] environment: fix --root option with relative path
  2021-01-18  8:26 [bug#45953] [PATCH] environment: fix --root option with relative path guix-patches--- via
@ 2021-01-19 17:16 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2021-01-19 17:16 UTC (permalink / raw)
  To: JOULAUD François; +Cc: 45953-done

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’.




^ permalink raw reply	[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).