Skip to content

Commit cd77978

Browse files
committed
fix(tool): reorder cmd.Wait before wg.Wait in monitor goroutine
cmd.Wait() must run before wg.Wait() so WaitDelay closes the pipes and unblocks the scanner goroutines. Previous order (wg.Wait first) caused the monitor to block until child processes exited naturally, ignoring the context timeout on Linux CI runners.
1 parent 6206c8a commit cd77978

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎internal/tool/monitor.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ func (mm *MonitorManager) Start(ctx context.Context, command, description, dir s
170170
go scanInto(stderr, "STDERR: ")
171171

172172
go func() {
173-
wg.Wait()
174173
_ = cmd.Wait()
174+
wg.Wait()
175175
close(mon.done)
176176
slog.Info("monitor finished", "id", monitorID, "description", description)
177177
}()

0 commit comments

Comments
 (0)