mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-08-07 05:39:55 +00:00
Improve error message when CLI wrapper Exec fails
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5348b5e696)
This commit is contained in:
committed by
Brad Davidson
parent
fd77c076a1
commit
944beb1af3
@@ -205,7 +205,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
|
||||
|
||||
Reference in New Issue
Block a user