Show executed command when errors occurred (#1252)

This commit is contained in:
刘相轩
2020-05-09 13:35:31 +09:00
committed by GitHub
parent 1e9e228a9a
commit 23be9af2db
2 changed files with 3 additions and 3 deletions
+1 -2
View File
@@ -2,13 +2,12 @@ package helmexec
import (
"fmt"
"path/filepath"
"strings"
)
func newExitError(helmCmdPath string, exitStatus int, errorMessage string) ExitError {
return ExitError{
Message: fmt.Sprintf("%s exited with status %d:\n%s", filepath.Base(helmCmdPath), exitStatus, indent(strings.TrimSpace(errorMessage))),
Message: fmt.Sprintf("the following cmd exited with status %d:\n%s\n\n%s", exitStatus, indent(strings.TrimSpace(helmCmdPath)), indent(strings.TrimSpace(errorMessage))),
Code: exitStatus,
}
}