1
0
mirror of https://github.com/writeas/writeas-cli synced 2025-07-26 23:08:16 +00:00

Don't default host to Write.as in wf-cli

We want to keep wf-cli service-agnostic and to make sure there's no
confusing overlap between this client and writeas-cli.

Ref T586
This commit is contained in:
Matt Baer 2019-07-22 13:24:09 -04:00
parent 1b8655f06a
commit 4e4ccbe2e8

View File

@ -38,8 +38,10 @@ func newClient(c *cli.Context, authRequired bool) (*writeas.Client, error) {
clientConfig.URL = cfg.Default.Host + "/api" clientConfig.URL = cfg.Default.Host + "/api"
} else if config.IsDev() { } else if config.IsDev() {
clientConfig.URL = config.DevBaseURL + "/api" clientConfig.URL = config.DevBaseURL + "/api"
} else { } else if c.App.Name == "writeas" {
clientConfig.URL = config.WriteasBaseURL + "/api" clientConfig.URL = config.WriteasBaseURL + "/api"
} else {
return nil, fmt.Errorf("Must supply a host. Example: %s --host example.com %s", executable.Name(), c.Command.Name)
} }
if config.IsTor(c) { if config.IsTor(c) {
clientConfig.URL = config.TorURL(c) clientConfig.URL = config.TorURL(c)