diff --git a/changelog/unreleased/76 b/changelog/unreleased/76 new file mode 100644 index 0000000000..d32828f762 --- /dev/null +++ b/changelog/unreleased/76 @@ -0,0 +1,8 @@ +Bugfix: set correct flag type in the flagsets + +While upgrading to the micro/cli version 2 there where two instances of `StringFlag` +which had not been changed to `StringSliceFlag`. +This caused `ocis-reva users` and `ocis-reva storage-root` to fail on startup. + +https://github.com/owncloud/ocis-reva/issues/75 +https://github.com/owncloud/ocis-reva/pull/76 diff --git a/pkg/flagset/storageroot.go b/pkg/flagset/storageroot.go index 1dea422790..8a10ad42e3 100644 --- a/pkg/flagset/storageroot.go +++ b/pkg/flagset/storageroot.go @@ -116,9 +116,9 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag { EnvVars: []string{"REVA_STORAGE_ROOT_URL"}, Destination: &cfg.Reva.StorageRoot.URL, }, - &cli.StringFlag{ + &cli.StringSliceFlag{ Name: "service", - Value: "storageprovider", + Value: cli.NewStringSlice("storageprovider"), Usage: "--service storageprovider [--service otherservice]", EnvVars: []string{"REVA_STORAGE_ROOT_SERVICES"}, }, diff --git a/pkg/flagset/users.go b/pkg/flagset/users.go index 7b1ee79b11..7d5cebbb66 100644 --- a/pkg/flagset/users.go +++ b/pkg/flagset/users.go @@ -195,9 +195,9 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag { EnvVars: []string{"REVA_USERS_URL"}, Destination: &cfg.Reva.Users.URL, }, - &cli.StringFlag{ + &cli.StringSliceFlag{ Name: "service", - Value: "userprovider", // TODO preferences + Value: cli.NewStringSlice("userprovider"), // TODO preferences Usage: "--service userprovider [--service otherservice]", EnvVars: []string{"REVA_USERS_SERVICES"}, },