mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
services: Check if service is #f before applying clause.
* gnu/services.scm (apply-clauses): Check if service is #f before trying to
apply clause. Follow up of 1819512073
.
This commit is contained in:
parent
0ae29db11d
commit
1a2eb26286
1 changed files with 8 additions and 6 deletions
|
@ -343,12 +343,14 @@ (define (apply-clauses clauses services)
|
||||||
((head . tail)
|
((head . tail)
|
||||||
(let ((service clauses
|
(let ((service clauses
|
||||||
(fold2 (lambda (clause service remainder)
|
(fold2 (lambda (clause service remainder)
|
||||||
(match clause
|
(if service
|
||||||
((kind proc properties)
|
(match clause
|
||||||
(if (eq? kind (service-kind service))
|
((kind proc properties)
|
||||||
(values (proc service) remainder)
|
(if (eq? kind (service-kind service))
|
||||||
(values service
|
(values (proc service) remainder)
|
||||||
(cons clause remainder))))))
|
(values service
|
||||||
|
(cons clause remainder)))))
|
||||||
|
(values #f (cons clause remainder))))
|
||||||
head
|
head
|
||||||
'()
|
'()
|
||||||
clauses)))
|
clauses)))
|
||||||
|
|
Loading…
Reference in a new issue