mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38: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)
|
||||
(let ((service clauses
|
||||
(fold2 (lambda (clause service remainder)
|
||||
(match clause
|
||||
((kind proc properties)
|
||||
(if (eq? kind (service-kind service))
|
||||
(values (proc service) remainder)
|
||||
(values service
|
||||
(cons clause remainder))))))
|
||||
(if service
|
||||
(match clause
|
||||
((kind proc properties)
|
||||
(if (eq? kind (service-kind service))
|
||||
(values (proc service) remainder)
|
||||
(values service
|
||||
(cons clause remainder)))))
|
||||
(values #f (cons clause remainder))))
|
||||
head
|
||||
'()
|
||||
clauses)))
|
||||
|
|
Loading…
Reference in a new issue