summaryrefslogtreecommitdiff
path: root/guix/scripts/pull.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-05-25 00:25:15 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-05-25 00:25:15 +0200
commit57df83e07d4b5e78d9a54c1a88d05b4a9ed65714 (patch)
tree76684e63965e9ad6e37d9d45bc3159e6c9782cd0 /guix/scripts/pull.scm
parent43d9ed7792808638eabb43aa6133f1d6186c520b (diff)
parent136b7d81f0eb713783e9ea7cf7f260a2b6252dfd (diff)
downloadguix-patches-57df83e07d4b5e78d9a54c1a88d05b4a9ed65714.tar
guix-patches-57df83e07d4b5e78d9a54c1a88d05b4a9ed65714.tar.gz
Merge branch 'staging' into core-updates
Diffstat (limited to 'guix/scripts/pull.scm')
-rw-r--r--guix/scripts/pull.scm25
1 files changed, 15 insertions, 10 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 3929cd402e..2d428546c9 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -203,6 +203,10 @@ true, display what would be built without actually building it."
(define update-profile
(store-lift build-and-use-profile))
+ (define guix-command
+ ;; The 'guix' command before we've built the new profile.
+ (which "guix"))
+
(mlet %store-monad ((manifest (channel-instances->manifest instances)))
(mbegin %store-monad
(update-profile profile manifest
@@ -211,17 +215,18 @@ true, display what would be built without actually building it."
(munless dry-run?
(return (newline))
(return (display-profile-news profile #:concise? #t))
- (match (which "guix")
- (#f (return #f))
- (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
+ (if guix-command
+ (let ((new (map (cut string-append <> "/bin/guix")
+ (list (user-friendly-profile profile)
+ profile))))
+ ;; Is the 'guix' command previously in $PATH the same as the new
+ ;; one? If the answer is "no", then suggest 'hash guix'.
+ (unless (member guix-command new)
+ (display-hint (format #f (G_ "After setting @code{PATH}, run
@command{hash guix} to make sure your shell refers to @file{~a}.")
- (first new))))
- (return #f))))))))
+ (first new))))
+ (return #f))
+ (return #f))))))
(define (honor-lets-encrypt-certificates! store)
"Tell Guile-Git to use the Let's Encrypt certificates."