~ruther/guix-local

dc7b3e56337ee9d8dcd8fe7d5cab71ef536d024f — Christopher Baines 8 years ago 65831c6
services: herd: Fix matching ok responses from shepherd service.

Previously the match expression case for a successful response
(where error is #f) required that the result component contained a list with a
single element.

As far as I see when looking at the responses from the shepherd, this is not
normally the case. Therefore, to avoid treating successful responses as
errors, make the match requirement more permissive, accepting any value.

* gnu/services/herd.scm (invoke-action): Change match condition for ok responses.
1 files changed, 1 insertions(+), 1 deletions(-)

M gnu/services/herd.scm
M gnu/services/herd.scm => gnu/services/herd.scm +1 -1
@@ 146,7 146,7 @@ result.  Otherwise return #f."
    (force-output sock)

    (match (read sock)
      (('reply ('version 0 _ ...) ('result (result)) ('error #f)
      (('reply ('version 0 _ ...) ('result result) ('error #f)
               ('messages messages))
       (for-each display-message messages)
       (cont result))