mirror of
https://github.com/writeas/writeas-cli
synced 2025-07-26 23:08:16 +00:00
newClient must prepend scheme to default host
this updates newClient to prepend the scheme https to the default host found in the global config, and only use said host when both the user and host are configured
This commit is contained in:
parent
72dbd1c7ef
commit
836eea7dab
@ -34,8 +34,8 @@ func newClient(c *cli.Context) (*writeas.Client, error) {
|
||||
}
|
||||
if host := HostURL(c); host != "" {
|
||||
clientConfig.URL = host + "/api"
|
||||
} else if cfg.Default.Host != "" {
|
||||
clientConfig.URL = cfg.Default.Host + "/api"
|
||||
} else if cfg.Default.Host != "" && cfg.Default.User != "" {
|
||||
clientConfig.URL = "https://" + cfg.Default.Host + "/api"
|
||||
} else if config.IsDev() {
|
||||
clientConfig.URL = config.DevBaseURL + "/api"
|
||||
} else if c.App.Name == "writeas" {
|
||||
|
Loading…
Reference in New Issue
Block a user