create, run: amend final errors

As the error may contain anything, it may not be clear to a user that
the whole (create or run) operation failed. Amend the errors.

Also, change the code flow in create to match that of run, so we don't
have to add the fake "return nil" at the end.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2021-08-04 20:13:39 -07:00
parent 9ba2f65d6b
commit d974b22ac4
2 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
package main
import (
"fmt"
"os"
"github.com/urfave/cli"
@@ -74,6 +75,6 @@ command(s) that get executed on start, edit the args parameter of the spec. See
// notified of the exit with the correct exit status.
os.Exit(status)
}
return err
return fmt.Errorf("runc run failed: %w", err)
},
}