We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2faf86 commit 97f25c9Copy full SHA for 97f25c9
pkg/util/util.go
@@ -161,13 +161,14 @@ func Copy(m *clusterv1.Machine) *clusterv1.Machine {
161
}
162
163
// ExecCommand Executes a local command in the current shell.
164
-func ExecCommand(name string, args ...string) string {
+func ExecCommand(name string, args ...string) (string, error) {
165
cmdOut, err := exec.Command(name, args...).Output()
166
if err != nil {
167
s := strings.Join(append([]string{name}, args...), " ")
168
- klog.Errorf("error executing command %q: %v", s, err)
+ klog.Infof("Executing command %q: %v", s, err)
169
+ return string(""), err
170
- return string(cmdOut)
171
+ return string(cmdOut), nil
172
173
174
// Filter filters a list for a string.
0 commit comments