mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-23 22:29:59 -05:00
fix search index flags
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
committed by
Florian Schade
parent
2c8c334e88
commit
6e75e41023
@@ -27,7 +27,8 @@ func Index(cfg *config.Config) *cobra.Command {
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
if cmd.Flag("space").Value.String() == "" && !cmd.Flag("all-spaces").Changed {
|
||||
allSpaces, _ := cmd.Flags().GetBool("all-spaces")
|
||||
if cmd.Flag("space").Value.String() == "" && !allSpaces {
|
||||
return errors.New("either --space or --all-spaces is required")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user