fix(log): add the stdio log if it doesn't exist

Signed-off-by: Raito Bezarius <raito@lix.systems>
This commit is contained in:
raito 2024-07-20 00:33:44 +02:00
parent c5dea04717
commit dfb9595f7d

View file

@ -496,9 +496,13 @@ class NixConfigure(buildstep.CommandMixin, steps.BuildStep):
self.observer = logobserver.BufferLogObserver() self.observer = logobserver.BufferLogObserver()
self.addLogObserver("stdio", self.observer) self.addLogObserver("stdio", self.observer)
@defer.inlineCallbacks @defer.inlineCallbacks
def run(self) -> Generator[Any, object, Any]: def run(self) -> Generator[Any, object, Any]:
try:
configure_log: Log = yield self.getLog("stdio") configure_log: Log = yield self.getLog("stdio")
except Exception:
configure_log: Log = yield self.addLog("stdio")
# Takes precedence. # Takes precedence.
configure_log.addStdout("checking if there's a .ci/buildbot.nix...") configure_log.addStdout("checking if there's a .ci/buildbot.nix...")