From 158dc2e18d30120477a8bd474d9f88e0d6a6e752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 16 Dec 2024 17:37:34 +0100 Subject: [PATCH] fix: set logFile to nil on terminate --- modules/ollama/local.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/ollama/local.go b/modules/ollama/local.go index ce6be0cd0a..72a1787405 100644 --- a/modules/ollama/local.go +++ b/modules/ollama/local.go @@ -506,5 +506,11 @@ func (c *OllamaContainer) Terminate(ctx context.Context) error { errs = append(errs, fmt.Errorf("remove log: %w", err)) } - return errors.Join(errs...) + if len(errs) > 0 { + return errors.Join(errs...) + } + + c.localCtx.logFile = nil + + return nil }