summaryrefslogtreecommitdiff
path: root/cmd/podmanV2/registry/registry.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-03-23 11:56:46 -0500
committerBrent Baude <bbaude@redhat.com>2020-03-24 07:28:55 -0500
commit2d4fa996ef86d803442f96112ab9ee341d26215a (patch)
tree0aa0ce07265b0fd6d7581764070d6bfe825a6724 /cmd/podmanV2/registry/registry.go
parent3dbf2cb5aff67f82e486cd95aca170e44b8fc75a (diff)
downloadpodman-2d4fa996ef86d803442f96112ab9ee341d26215a.tar.gz
podman-2d4fa996ef86d803442f96112ab9ee341d26215a.tar.bz2
podman-2d4fa996ef86d803442f96112ab9ee341d26215a.zip
podmanv2 exit code
add ability to set and get exit code. Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podmanV2/registry/registry.go')
-rw-r--r--cmd/podmanV2/registry/registry.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmd/podmanV2/registry/registry.go b/cmd/podmanV2/registry/registry.go
index 793d520a8..b0c11ba04 100644
--- a/cmd/podmanV2/registry/registry.go
+++ b/cmd/podmanV2/registry/registry.go
@@ -1,6 +1,7 @@
package registry
import (
+ "github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/pkg/domain/entities"
"github.com/containers/libpod/pkg/domain/infra"
"github.com/pkg/errors"
@@ -21,8 +22,18 @@ var (
EngineOpts entities.EngineOptions
GlobalFlags entities.EngineFlags
+
+ ExitCode = define.ExecErrorCodeGeneric
)
+func SetExitCode(code int) {
+ ExitCode = code
+}
+
+func GetExitCode() int {
+ return ExitCode
+}
+
// HelpTemplate returns the help template for podman commands
// This uses the short and long options.
// command should not use this.