Browse Source

Improve error message when CLI wrapper Exec fails

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/7371/head
Brad Davidson 2 years ago committed by Brad Davidson
parent
commit
5348b5e696
  1. 5
      cmd/k3s/main.go

5
cmd/k3s/main.go

@ -204,7 +204,10 @@ func stageAndRun(dataDir, cmd string, args []string) error {
logrus.Debugf("Running %s %v", cmd, args) 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 // getAssetAndDir returns the name of the bindata asset, along with a directory path

Loading…
Cancel
Save