diff --git a/cmd/k3s/main.go b/cmd/k3s/main.go index edce8215d6..def64bc9a3 100644 --- a/cmd/k3s/main.go +++ b/cmd/k3s/main.go @@ -204,7 +204,10 @@ func stageAndRun(dataDir, cmd string, args []string) error { logrus.Debugf("Running %s %v", cmd, args) - return syscall.Exec(cmd, args, os.Environ()) + if err := syscall.Exec(cmd, args, os.Environ()); err != nil { + return errors.Wrapf(err, "exec %s failed", cmd) + } + return nil } // getAssetAndDir returns the name of the bindata asset, along with a directory path