cmd/syncthing: Don't fail early on api setup error (fixes 7558) (#7591)

* cmd/syncthing: Don't fail early on api setup error (fixes 7558)

* switch to factory pattern

* refactor config command to show help on nothing

* wip

* wip

* already abort in before
This commit is contained in:
Simon Frei
2021-04-25 20:48:17 +01:00
committed by GitHub
parent 54e27f551d
commit ef4b8a2cf8
6 changed files with 185 additions and 103 deletions
+4 -1
View File
@@ -42,7 +42,10 @@ var operationCommand = cli.Command{
}
func foldersOverride(c *cli.Context) error {
client := c.App.Metadata["client"].(*APIClient)
client, err := getClientFactory(c).getClient()
if err != nil {
return err
}
cfg, err := getConfig(client)
if err != nil {
return err