Commit 831a6c3
committed
fix(shim): propagate exit code instead of reporting failure on windows
On Windows, syscall.Exec is not supported so the shim falls back to
cmd.Run(). When the wrapped command exits with a non-zero code,
cmd.Run() returns an *exec.ExitError which was incorrectly treated
as a shim failure.
Now the shim detects ExitError and calls os.Exit() with the command's
actual exit code instead of printing a misleading error message.
Fixes #591 parent 702dfb6 commit 831a6c3
2 files changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
315 | 325 | | |
316 | 326 | | |
317 | 327 | | |
| |||
0 commit comments