unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: guix-patches--- via <guix-patches@gnu.org>
To: 45953@debbugs.gnu.org
Subject: [bug#45953] [PATCH] environment: fix --root option with relative path
Date: Mon, 18 Jan 2021 08:26:02 +0000	[thread overview]
Message-ID: <20210118082300.phr55ee5chgwmptl@fjo-extia-HPdeb.example.avalenn.eu> (raw)

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



             reply	other threads:[~2021-01-18 16:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18  8:26 guix-patches--- via [this message]
2021-01-19 17:16 ` bug#45953: [PATCH] environment: fix --root option with relative path Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210118082300.phr55ee5chgwmptl@fjo-extia-HPdeb.example.avalenn.eu \
    --to=guix-patches@gnu.org \
    --cc=45953@debbugs.gnu.org \
    --cc=Francois.JOULAUD@radiofrance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).