Skip to content

Commit

Permalink
Fix copypasta comparison error
Browse files Browse the repository at this point in the history
And a godot error
  • Loading branch information
colindean authored Jan 8, 2023
1 parent 46fd81d commit eba1b65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/vela-email/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var (
// ErrorMissingSMTPParam is returned when the plugin is missing a smtp host or port parameter.
ErrorMissingSMTPParam = errors.New("missing smtp parameter (host/port)")

// ErrorAuthSpecifiedButCredentialsMissing is returned when the plugin is missing credentials when auth type was specified
// ErrorAuthSpecifiedButCredentialsMissing is returned when the plugin is missing credentials when auth type was specified.
ErrorAuthSpecifiedButCredentialsMissing = errors.New("missing credentials when auth type was specified")
)

Expand Down Expand Up @@ -144,7 +144,7 @@ func (p *Plugin) Validate() error {
return ErrorMissingSMTPParam
}

if len(p.Auth) > 0 && !(len(p.SMTPHost.Username) > 0 && len(p.SMTPHost.Username) > 0) {
if len(p.Auth) > 0 && !(len(p.SMTPHost.Username) > 0 && len(p.SMTPHost.Password) > 0) {
return ErrorAuthSpecifiedButCredentialsMissing
}

Expand Down

0 comments on commit eba1b65

Please sign in to comment.