Skip to content

Commit 62e7a60

Browse files
committed
🌱 (chore): wrap error with %w in test_context.go for improved diagnostics
- Updated error formatting to use `%w` in `fmt.Errorf` for proper error chaining - Affects command execution error reporting in test context
1 parent 6acdbd2 commit 62e7a60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎test/e2e/utils/test_context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func (cc *CmdContext) Run(cmd *exec.Cmd) ([]byte, error) {
307307
_, _ = fmt.Fprintf(GinkgoWriter, "running: %s\n", command)
308308
output, err := cmd.CombinedOutput()
309309
if err != nil {
310-
return output, fmt.Errorf("%s failed with error: (%v) %s", command, err, string(output))
310+
return output, fmt.Errorf("%q failed with error %q: %w", command, string(output), err)
311311
}
312312

313313
return output, nil

0 commit comments

Comments
 (0)