From 2b4f1e076c536bcc1af93cebc47dc3bd950d3770 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sun, 8 Feb 2026 16:58:03 +0100 Subject: [PATCH] build-remote: catch exceptions in Instance::build this was just forgotten when the migration was done. fixes #1083 Change-Id: I7a94edf304323b0c43e0a1cff39e5a52696c50e3 --- lix/legacy/build-remote.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lix/legacy/build-remote.cc b/lix/legacy/build-remote.cc index 63203093f..9803f37a0 100644 --- a/lix/legacy/build-remote.cc +++ b/lix/legacy/build-remote.cc @@ -405,7 +405,7 @@ kj::Promise Instance::init(InitContext context) } kj::Promise Instance::buildImpl(BuildContext context) -{ +try { if (!initialized) { throw Error("build hook not fully initialized"); } @@ -461,6 +461,8 @@ kj::Promise Instance::buildImpl(BuildContext context) auto ac = context.getResults().initResult().initGood().initAccept(); ac.setMachine(kj::heap(store, drvPath, std::move(*builder))); +} catch (...) { + RPC_FILL(context.getResults(), initResult, std::current_exception()); } kj::Promise Instance::build(BuildContext context)