Skip to content

Commit

Permalink
do not ignore error on failing to acquire semaphore
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Jun 6, 2024
1 parent 970cc31 commit 543d4bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion process.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (proc *concurrentProcess) run(eg *errgroup.Group, exec *cmdExecution, callb
eg.Go(func() error {
defer proc.wg.Done()
if err := proc.sema.Acquire(proc.ctx, 1); err != nil {
return nil
return fmt.Errorf("could not acquire semaphore to run %q: %w", exec.cmd, err)
}
stdout, err := exec.run()
proc.sema.Release(1)
Expand Down

0 comments on commit 543d4bd

Please sign in to comment.