Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions go/vt/mysqlctl/mysqld.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,6 @@ func (mysqld *Mysqld) Shutdown(ctx context.Context, cnf *Mycnf, waitForMysqld bo
// If input is not nil, pipe it to the command's stdin.
func execCmd(name string, args, env []string, dir string, input io.Reader) (cmd *exec.Cmd, output string, err error) {
cmdPath, _ := exec.LookPath(name)
log.Infof("execCmd: %v %v %v", name, cmdPath, args)

cmd = exec.Command(cmdPath, args...)
cmd.Env = env
Expand All @@ -586,10 +585,9 @@ func execCmd(name string, args, env []string, dir string, input io.Reader) (cmd
out, err := cmd.CombinedOutput()
output = string(out)
if err != nil {
log.Infof("execCmd: %v failed: %v", name, err)
err = fmt.Errorf("%v: %v, output: %v", name, err, output)
log.Errorf("execCmd: %v failed: %v", name, err)
err = fmt.Errorf("%v: %w, output: %v", name, err, output)
}
log.Infof("execCmd: %v output: %v", name, output)
return cmd, output, err
}

Expand Down