From 7b9ad9624079d95257069d4976e63130457883e5 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Fri, 6 Jun 2025 09:57:19 +0200 Subject: [PATCH] fix SIGSEGV on Enable Watch Signed-off-by: Nicolas De Loof --- pkg/compose/up.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkg/compose/up.go b/pkg/compose/up.go index 4580045c5..70ac9f917 100644 --- a/pkg/compose/up.go +++ b/pkg/compose/up.go @@ -72,12 +72,9 @@ func (s *composeService) Up(ctx context.Context, project *types.Project, options var isTerminated atomic.Bool printer := newLogPrinter(options.Start.Attach) - var watcher *Watcher - if options.Start.Watch { - watcher, err = NewWatcher(project, options, s.watch) - if err != nil { - return err - } + watcher, err := NewWatcher(project, options, s.watch) + if err != nil && options.Start.Watch { + return err } var navigationMenu *formatter.LogKeyboard