Skip to content

Commit fa7e85e

Browse files
Trolldemortedndeloof
authored andcommitted
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 <benediktradtke@gmail.com>
1 parent d9423f6 commit fa7e85e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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)