From 4d79f072cc7b502fc25486d514c9200ba684a596 Mon Sep 17 00:00:00 2001 From: JOULAUD François Date: Mon, 18 Jan 2021 08:26:02 +0000 Subject: environment: Fix '--root' option with relative file name. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (register-gc-root): Fix gc-root path normalization. * tests/guix-environment.sh: Add test. Co-authored-by: Ludovic Courtès --- guix/scripts/environment.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guix') 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) -- cgit v1.2.3