diff options
Diffstat (limited to 'cmd/podman/main.go')
-rw-r--r-- | cmd/podman/main.go | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go index 32ecaede7..f9820c075 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -27,6 +27,26 @@ var ( exitCode = 125 ) +// Commands that the remote and local client have +// implemented. +var mainCommands = []*cobra.Command{ + _buildCommand, + _exportCommand, + _historyCommand, + _imagesCommand, + _importCommand, + _infoCommand, + _inspectCommand, + _killCommand, + _pullCommand, + _pushCommand, + _rmiCommand, + _tagCommand, + _versionCommand, + imageCommand.Command, + systemCommand.Command, +} + var cmdsNotRequiringRootless = map[*cobra.Command]bool{ _versionCommand: true, _createCommand: true, @@ -40,7 +60,7 @@ var cmdsNotRequiringRootless = map[*cobra.Command]bool{ _killCommand: true, _pauseCommand: true, _restartCommand: true, - _runCommmand: true, + _runCommand: true, _unpauseCommand: true, _searchCommand: true, _statsCommand: true, @@ -92,6 +112,8 @@ func init() { rootCmd.PersistentFlags().BoolVar(&MainGlobalOpts.Syslog, "syslog", false, "Output logging information to syslog as well as the console") rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.TmpDir, "tmpdir", "", "Path to the tmp directory") + rootCmd.AddCommand(mainCommands...) + rootCmd.AddCommand(getMainCommands()...) } func initConfig() { @@ -185,7 +207,7 @@ func main() { exitCode = status.ExitStatus() } } - fmt.Fprintln(os.Stderr, err.Error()) + fmt.Fprintln(os.Stderr, "Error:", err.Error()) } } else { // The exitCode modified from 125, indicates an application |