Skip to content

Commit

Permalink
Add context error to error output to make it clearer when we're timin…
Browse files Browse the repository at this point in the history
…g out
  • Loading branch information
RebeccaMahany committed Nov 15, 2024
1 parent 2fabf37 commit 6915ae5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ee/debug/checkups/osquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (o *osqueryCheckup) interactive(ctx context.Context) error {
out, err := cmd.CombinedOutput()
o.executionTimes[cmd.String()] = fmt.Sprintf("%d ms", time.Now().UnixMilli()-startTime)
if err != nil {
return fmt.Errorf("running %s interactive: err %w, output %s", launcherPath, err, string(out))
return fmt.Errorf("running %s interactive: err %w, output %s; ctx err: %+v", launcherPath, err, string(out), cmdCtx.Err())
}

return nil
Expand Down

0 comments on commit 6915ae5

Please sign in to comment.