Skip to content

Commit

Permalink
fix: do not wrap nil errors
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Aug 16, 2024
1 parent b692bdd commit c35c3da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/portforward/loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ func (l *Loop) run(runCtx context.Context, runDone chan<- struct{},
if updateReceived {
// Signal to the Update call that the service has started
// and if it failed to start.
updateResult <- fmt.Errorf("starting port forwarding service: %w", err)
if err != nil {
err = fmt.Errorf("starting port forwarding service: %w", err)
}
updateResult <- err
}
}
}
Expand Down

0 comments on commit c35c3da

Please sign in to comment.