From ac3381e2775c71a42816f3c2eeb64056455467d0 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 11 Feb 2020 16:15:16 +0100 Subject: [PATCH] set correct flag type (#76) merging because the failing tests are unrelated --- changelog/unreleased/76 | 8 ++++++++ pkg/flagset/storageroot.go | 4 ++-- pkg/flagset/users.go | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 changelog/unreleased/76 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"}, },