summaryrefslogtreecommitdiff
path: root/guix/scripts/pull.scm
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2023-07-13 17:21:32 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2023-07-13 17:21:32 +0200
commit15406013fe63f2ab238eec2d7a8adbc586806ac8 (patch)
tree8377d7c70a925f7c5ea4c04473c4eb547610b64b /guix/scripts/pull.scm
parenta3ac317ab4a90f66ac65055fa26dee58ed2367b8 (diff)
parentdd4c1992103a65b8fbdc80fe07a9fe9be822769a (diff)
Merge branch 'master' into emacs-team
Diffstat (limited to 'guix/scripts/pull.scm')
-rw-r--r--guix/scripts/pull.scm31
1 files changed, 15 insertions, 16 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index cd2e470289..ecd264d3fa 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -769,22 +769,21 @@ Use '~/.config/guix/channels.scm' instead."))
(url (or (assoc-ref opts 'repository-url)
(environment-variable))))
(if (or ref url)
- (match (find guix-channel? channels)
- ((? channel? guix)
- ;; Apply '--url', '--commit', and '--branch' to the 'guix' channel.
- (let ((url (or url (channel-url guix))))
- (cons (match ref
- (('commit . commit)
- (channel (inherit guix)
- (url url) (commit commit) (branch #f)))
- (('branch . branch)
- (channel (inherit guix)
- (url url) (commit #f) (branch branch)))
- (#f
- (channel (inherit guix) (url url))))
- (remove guix-channel? channels))))
- (#f ;no 'guix' channel, failure will ensue
- channels))
+ ;; Apply '--url', '--commit', and '--branch' to the 'guix' channel.
+ (map (lambda (c)
+ (if (guix-channel? c)
+ (let ((url (or url (channel-url c))))
+ (match ref
+ (('commit . commit)
+ (channel (inherit c)
+ (url url) (commit commit) (branch #f)))
+ (('branch . branch)
+ (channel (inherit c)
+ (url url) (commit #f) (branch branch)))
+ (#f
+ (channel (inherit c) (url url)))))
+ c))
+ channels)
channels)))
(define (validate-cache-directory-ownership)