arbitrary exec example functional

This commit is contained in:
2022-08-02 20:58:35 -07:00
parent 0dddd8ca09
commit 2ae269d3c9
6 changed files with 52 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ func execute(ctx context.Context, args []string) (string, string, int, error) {
if customErr != nil {
err = customErr
}
if code != 0 && err == nil {
if _, ok := err.(*exec.ExitError); ok && code != 0 {
err = fmt.Errorf("received error code %d for stderr `%s`: %w", code, warnings, ErrUnspecified)
}