Skip to content

Commit

Permalink
unexpected exit can still exit
Browse files Browse the repository at this point in the history
  • Loading branch information
marwan-at-work committed Jan 18, 2024
1 parent 8eb996e commit a0a0f40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion watcher/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (w *watcher) watch(ctx context.Context, files []string) error {
for {
select {
case <-ctx.Done():
if err == nil {
if err == nil && w.cmd != nil {
err = errors.Join(<-w.exitChan, ctx.Err())
}
return err
Expand Down

0 comments on commit a0a0f40

Please sign in to comment.