Commit db81e4c
authored
chore(internal/command): update error handling in runCmd (#4353)
This change modifies Librarian to use `errors.As` for checking exit
errors during command execution.
The `runCmd` function in `internal/command/command.go` is updated to
replace a manual type assertion with `errors.As`.
The error message is also refined to use the `%w` verb for error
wrapping and includes the command's stderr for better debugging context.1 parent 11de988 commit db81e4c
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | | - | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
83 | 85 | | |
84 | | - | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
0 commit comments