diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-01-13 21:03:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-13 21:03:21 +0100 |
commit | 796ae87b1a3444557644944ddeb7cb37e303ef83 (patch) | |
tree | 192bd260c0b35519fe45ecbc91d7212251d82495 /cmd/podman/main.go | |
parent | c1d93666d4b175be29a0ba229ee0b94d50765888 (diff) | |
parent | 768c476ae3c1dbf37204f5769b43746358af899d (diff) | |
download | podman-796ae87b1a3444557644944ddeb7cb37e303ef83.tar.gz podman-796ae87b1a3444557644944ddeb7cb37e303ef83.tar.bz2 podman-796ae87b1a3444557644944ddeb7cb37e303ef83.zip |
Merge pull request #4850 from vrothberg/fix-linting
Fix linting
Diffstat (limited to 'cmd/podman/main.go')
-rw-r--r-- | cmd/podman/main.go | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go index c727eea85..a22b01f24 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -72,17 +72,13 @@ var mainCommands = []*cobra.Command{ } var rootCmd = &cobra.Command{ - Use: path.Base(os.Args[0]), - Long: "manage pods and images", - RunE: commandRunE(), - PersistentPreRunE: func(cmd *cobra.Command, args []string) error { - return before(cmd, args) - }, - PersistentPostRunE: func(cmd *cobra.Command, args []string) error { - return after(cmd, args) - }, - SilenceUsage: true, - SilenceErrors: true, + Use: path.Base(os.Args[0]), + Long: "manage pods and images", + RunE: commandRunE(), + PersistentPreRunE: before, + PersistentPostRunE: after, + SilenceUsage: true, + SilenceErrors: true, } var MainGlobalOpts cliconfig.MainFlags @@ -160,16 +156,13 @@ func main() { } if err := rootCmd.Execute(); err != nil { outputError(err) - } else { + } else if exitCode == define.ExecErrorCodeGeneric { // The exitCode modified from define.ExecErrorCodeGeneric, // indicates an application // running inside of a container failed, as opposed to the // podman command failed. Must exit with that exit code // otherwise command exited correctly. - if exitCode == define.ExecErrorCodeGeneric { - exitCode = 0 - } - + exitCode = 0 } // Check if /etc/containers/registries.conf exists when running in |