Commit 628920e2 authored by Matthew Holt's avatar Matthew Holt

Improve logic related to error handling on SiteExists call

No need to check if SiteExists if the config is not managed or the name
does not even qualify.
parent 15d25f1c
......@@ -133,6 +133,10 @@ func (c *Config) ObtainCert(allowPrompts bool) error {
}
func (c *Config) obtainCertName(name string, allowPrompts bool) error {
if !c.Managed || !HostQualifies(name) {
return nil
}
storage, err := c.StorageFor(c.CAUrl)
if err != nil {
return err
......@@ -143,7 +147,7 @@ func (c *Config) obtainCertName(name string, allowPrompts bool) error {
return err
}
if !c.Managed || !HostQualifies(name) || siteExists {
if siteExists {
return nil
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment