mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 20:07:55 +08:00
cli: move client-only code out of the server flow
earlier, some of the client exclusive code was being run on zot server instance too. cli: fix the bug: spinner is not stopped with -o
This commit is contained in:
+3
-3
@@ -19,7 +19,7 @@ func metadataConfig(md *mapstructure.Metadata) viper.DecoderConfigOption {
|
||||
}
|
||||
}
|
||||
|
||||
func NewRootCmd(configPath string) *cobra.Command {
|
||||
func NewRootCmd() *cobra.Command {
|
||||
showVersion := false
|
||||
config := api.NewConfig()
|
||||
|
||||
@@ -97,8 +97,8 @@ func NewRootCmd(configPath string) *cobra.Command {
|
||||
rootCmd.AddCommand(serveCmd)
|
||||
rootCmd.AddCommand(gcCmd)
|
||||
|
||||
rootCmd.AddCommand(NewConfigCommand(configPath))
|
||||
rootCmd.AddCommand(NewImageCommand(NewImageSearchService(), configPath))
|
||||
rootCmd.AddCommand(NewConfigCommand())
|
||||
rootCmd.AddCommand(NewImageCommand(NewImageSearchService()))
|
||||
|
||||
rootCmd.Flags().BoolVarP(&showVersion, "version", "v", false, "show the version and exit")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user