guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25772: [PATCH] guix package: Remove trailing slash from profile path


From: Ricardo Wurmus
Subject: bug#25772: [PATCH] guix package: Remove trailing slash from profile path.
Date: Fri, 17 Feb 2017 11:00:54 +0100

Fixes: <http://bugs.gnu.org/25762>.

* guix/scripts/package.scm (process-query): Remove trailing slash from profile
argument and resolve links.
---
 guix/scripts/package.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 9e5b7f3c7..544a1730e 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2016 Roel Janssen <address@hidden>
 ;;; Copyright © 2016 Benz Schenk <address@hidden>
 ;;; Copyright © 2016 Chris Marusich <address@hidden>
+;;; Copyright © 2017 Ricardo Wurmus <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -663,8 +664,9 @@ doesn't need it."
   "Process any query specified by OPTS.  Return #t when a query was actually
 processed, #f otherwise."
   (let* ((profiles (match (filter-map (match-lambda
-                                        (('profile . p) p)
-                                        (_              #f))
+                                        (('profile . p)
+                                         (readlink (string-trim-right p #\/)))
+                                        (_ #f))
                                       opts)
                      (() (list %current-profile))
                      (lst lst)))
-- 
2.11.1







reply via email to

[Prev in Thread] Current Thread [Next in Thread]