machine: ssh: Return monadic value from roll-back-managed-host.

Previously, <unspecified> would be returned. That was a bug. Monadic
procedures must always return monadic values.

* gnu/machine/ssh.scm (roll-back-managed-host): Return monadic value.

Change-Id: I3db2879dbfbcab5e9d251fa5ed02c8653adbeafb
This commit is contained in:
Arun Isaac 2025-01-07 00:12:54 +00:00
parent 4529c4bea1
commit 55a5181e74
No known key found for this signature in database
GPG key ID: 2E25EE8B61802BB3

View file

@ -2,6 +2,7 @@
;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
;;; Copyright © 2020-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2024 Ricardo <rekado@elephly.net>
;;; Copyright © 2025 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
@ -621,8 +622,9 @@ an environment type of 'managed-host."
#:store-directory-prefix store-dir
#:old-entries old-entries)))
(remote-result (machine-remote-eval machine remote-exp)))
(when (eqv? 'error remote-result)
(raise roll-back-failure))))
(if (eqv? 'error remote-result)
(raise roll-back-failure)
(return remote-result))))
;;;