summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-01-28 23:03:38 +0100
committerLudovic Courtès <ludo@gnu.org>2019-01-28 23:13:40 +0100
commitd1d72830f2d60b2853460c443081683ef2f7d5c4 (patch)
treeae53b1fcccd980e26fd36693312d0c5d84148e1c
parent3a8c4860fbccc840b28227dbe44cfffb128a91e0 (diff)
pull: Don't trigger 'hash guix' hint needlessly.
Previously if ~/.config/guix/current/bin was in $PATH, we'd still suggest to run 'hash guix' because we'd compare (which "guix") against /var/guix/profiles/per-user/…. * guix/scripts/pull.scm (build-and-install): Check whether (which "guix") matches PROFILE or its user-friendly variant.
-rw-r--r--guix/scripts/pull.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 41c7fb289a..6cecf8c2e1 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -197,11 +197,13 @@ true, display what would be built without actually building it."
(match (which "guix")
(#f (return #f))
(str
- (let ((command (string-append profile "/bin/guix")))
- (unless (string=? command str)
+ (let ((new (map (cut string-append <> "/bin/guix")
+ (list (user-friendly-profile profile)
+ profile))))
+ (unless (member str new)
(display-hint (format #f (G_ "After setting @code{PATH}, run
@command{hash guix} to make sure your shell refers to @file{~a}.")
- command)))
+ (first new))))
(return #f))))))))
(define (honor-lets-encrypt-certificates! store)