Skip to content

Commit

Permalink
Merge pull request #251 from djzager/registryrm
Browse files Browse the repository at this point in the history
bug(opm): packages flag on registry rm required
  • Loading branch information
openshift-merge-robot committed Apr 7, 2020
2 parents ce63aa3 + 9a0adbe commit da66554
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/opm/registry/rm.go
Expand Up @@ -25,7 +25,10 @@ func newRegistryRmCmd() *cobra.Command {

rootCmd.Flags().Bool("debug", false, "enable debug logging")
rootCmd.Flags().StringP("database", "d", "bundles.db", "relative path to database file")
rootCmd.Flags().StringSliceP("packages", "o", []string{}, "comma separated list of package names to be deleted")
rootCmd.Flags().StringSliceP("packages", "o", nil, "comma separated list of package names to be deleted")
if err := rootCmd.MarkFlagRequired("packages"); err != nil {
logrus.Panic("Failed to set required `packages` flag for `registry rm`")
}
rootCmd.Flags().Bool("permissive", false, "allow registry load errors")

return rootCmd
Expand Down Expand Up @@ -53,7 +56,7 @@ func rmFunc(cmd *cobra.Command, args []string) error {

logger := logrus.WithFields(logrus.Fields{"packages": packages})

logger.Info("adding to the registry")
logger.Info("removing from the registry")

registryDeleter := registry.NewRegistryDeleter(logger)

Expand Down

0 comments on commit da66554

Please sign in to comment.