offload: Gracefully handle invalid results from 'machines.scm'.
* guix/scripts/offload.scm (build-machines): Check the result of FILE. Ignore it if it's not a list of <build-machine>.
This commit is contained in:
parent
565af91acc
commit
a9a685cc00
|
@ -124,7 +124,15 @@ determined."
|
||||||
(save-module-excursion
|
(save-module-excursion
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(set-current-module %user-module)
|
(set-current-module %user-module)
|
||||||
(primitive-load file))))
|
(match (primitive-load file)
|
||||||
|
(((? build-machine? machines) ...)
|
||||||
|
machines)
|
||||||
|
(_
|
||||||
|
;; Instead of crashing, assume the empty list.
|
||||||
|
(warning (G_ "'~a' did not return a list of build machines; \
|
||||||
|
ignoring it~%")
|
||||||
|
file)
|
||||||
|
'())))))
|
||||||
(lambda args
|
(lambda args
|
||||||
(match args
|
(match args
|
||||||
(('system-error . rest)
|
(('system-error . rest)
|
||||||
|
|
Loading…
Reference in New Issue