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
.
master
parent
0ae29db11d
commit
1a2eb26286
|
@ -343,12 +343,14 @@ used."
|
|||
((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)))
|
||||
|
|
Reference in New Issue