mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
LogResult if there is an error
This commit is contained in:
parent
64ba0bf3d6
commit
ba38816d42
@ -160,6 +160,9 @@ func (h *hostExecutor) exec(cmd string, node *v1.Node) (Result, error) {
|
|||||||
// the command exits non-zero.
|
// the command exits non-zero.
|
||||||
func (h *hostExecutor) IssueCommandWithResult(cmd string, node *v1.Node) (string, error) {
|
func (h *hostExecutor) IssueCommandWithResult(cmd string, node *v1.Node) (string, error) {
|
||||||
result, err := h.exec(cmd, node)
|
result, err := h.exec(cmd, node)
|
||||||
|
if err != nil {
|
||||||
|
LogResult(result)
|
||||||
|
}
|
||||||
return result.Stdout, err
|
return result.Stdout, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user