Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Commit

Permalink
set correct flag type (#76)
Browse files Browse the repository at this point in the history
merging because the failing tests are unrelated
  • Loading branch information
C0rby authored Feb 11, 2020
1 parent 2b2e7f0 commit ac3381e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions changelog/unreleased/76
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions pkg/flagset/storageroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/flagset/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
},
Expand Down

0 comments on commit ac3381e

Please sign in to comment.