>From 95178018beb8c5458c154771ac9d1ff4866cc507 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Tue, 3 Jul 2018 19:49:04 +0200 Subject: [PATCH] profiles: Let canonicalize-profile return an absolute path. * guix/profiles.scm (canonicalize-profile): Return an absolute path. --- guix/profiles.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index ebd7da2a2..4a6a0a80e 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1547,8 +1547,8 @@ because the NUMBER is zero.)" (define (canonicalize-profile profile) "If PROFILE is %USER-PROFILE-DIRECTORY, return %CURRENT-PROFILE. Otherwise -return PROFILE unchanged. The goal is to treat '-p ~/.guix-profile' as if -'-p' was omitted." ; see +return PROFILE as an absolute path. The goal is to treat '-p ~/.guix-profile' +as if '-p' was omitted." ; see ;; Trim trailing slashes so that the basename comparison below works as ;; intended. @@ -1558,7 +1558,10 @@ return PROFILE unchanged. The goal is to treat '-p ~/.guix-profile' as if (dirname %user-profile-directory)) (string=? (basename profile) (basename %user-profile-directory))) %current-profile - profile))) + (string-append + (canonicalize-path (dirname profile)) + file-name-separator-string + (basename profile))))) (define (user-friendly-profile profile) "Return either ~/.guix-profile if that's what PROFILE refers to, directly or -- 2.17.0