Skip to content

Commit 3d1a3ec

Browse files
committed
Write error to watcher error channel if Start() fails
Up's loop will notice globalCtx is done, and invoke watcher.Stop(). Stop() reads from the watcher error channel. If Start() does not write an error, Stop() will never finish. Fixes #13262 Signed-off-by: Benedikt Radtke <[email protected]>
1 parent d9423f6 commit 3d1a3ec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/compose/watch.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ func (w *Watcher) Start(ctx context.Context) error {
8989
w.stopFn = cancelFunc
9090
wait, err := w.watchFn(ctx, w.project, w.options)
9191
if err != nil {
92+
go func() {
93+
w.errCh <- err
94+
}()
9295
return err
9396
}
9497
go func() {

0 commit comments

Comments
 (0)