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
+1 -1
View File
@@ -39,7 +39,7 @@ var errorsCommand = cli.Command{
}
func errorsPush(c *cli.Context) error {
client := c.App.Metadata["client"].(*APIClient)
client := c.App.Metadata["client"].(APIClient)
errStr := strings.Join(c.Args(), " ")
response, err := client.Post("system/error", strings.TrimSpace(errStr))
if err != nil {