Skip to content

Commit

Permalink
Don't check if there is an error before returning
Browse files Browse the repository at this point in the history
  • Loading branch information
ddebeau committed Sep 5, 2024
1 parent 065f306 commit a482fc4
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,6 @@ func (p *quayProvider) ValidateConfig(ctx context.Context, req provider.Validate
"The provider cannot create the Quay client if any configuration values are unknown. "+
"Either target apply the source of the unknown value(s) first, set the value(s) statically in the configuration, or set the appropriate environment variable(s).",
)
}

if resp.Diagnostics.HasError() {
return
}

Expand Down Expand Up @@ -214,9 +211,6 @@ func (p *quayProvider) ValidateConfig(ctx context.Context, req provider.Validate
"Cannot specify token and OAuth2 credentials",
"Token cannot be specified when OAuth2 credentials are also specified. You must pick one authentication method.",
)
}

if resp.Diagnostics.HasError() {
return
}

Expand All @@ -227,9 +221,6 @@ func (p *quayProvider) ValidateConfig(ctx context.Context, req provider.Validate
"The provider cannot create the Quay client as there is a missing or empty value for the Quay URL. "+
"Set the URL in the configuration or use the QUAY_URL environment variable.",
)
}

if resp.Diagnostics.HasError() {
return
}

Expand All @@ -239,9 +230,6 @@ func (p *quayProvider) ValidateConfig(ctx context.Context, req provider.Validate
"Quay URL is not a valid URL",
"The provider cannot create the Quay client as the URL provided is not valid.",
)
}

if resp.Diagnostics.HasError() {
return
}

Expand All @@ -250,9 +238,6 @@ func (p *quayProvider) ValidateConfig(ctx context.Context, req provider.Validate
"Missing Quay token and OAuth2 credentials",
"The provider cannot create the Quay client as both the Quay token and OAuth2 credentials are missing or empty.",
)
}

if resp.Diagnostics.HasError() {
return
}

Expand All @@ -263,9 +248,6 @@ func (p *quayProvider) ValidateConfig(ctx context.Context, req provider.Validate
"The provider cannot create the Quay client as there is a missing value or empty value for the OAuth2 username."+
"Set the OAuth2 username in the configuration or use the QUAY_OAUTH2_USERNAME environment variable.",
)
}

if resp.Diagnostics.HasError() {
return
}

Expand All @@ -276,9 +258,6 @@ func (p *quayProvider) ValidateConfig(ctx context.Context, req provider.Validate
"The provider cannot create the Quay client as there is a missing value or empty value for the OAuth2 password."+
"Set the OAuth2 password in the configuration or use the QUAY_OAUTH2_PASSWORD environment variable.",
)
}

if resp.Diagnostics.HasError() {
return
}

Expand All @@ -289,9 +268,6 @@ func (p *quayProvider) ValidateConfig(ctx context.Context, req provider.Validate
"The provider cannot create the Quay client as there is a missing value or empty value for the OAuth2 client ID."+
"Set the OAuth2 client ID in the configuration or use the QUAY_OAUTH2_CLIENT_ID environment variable.",
)
}

if resp.Diagnostics.HasError() {
return
}

Expand All @@ -302,9 +278,6 @@ func (p *quayProvider) ValidateConfig(ctx context.Context, req provider.Validate
"The provider cannot create the Quay client as there is a missing value or empty value for the OAuth2 token URL."+
"Set the OAuth2 token URL in the configuration or use the QUAY_OAUTH2_TOKEN_URL environment variable.",
)
}

if resp.Diagnostics.HasError() {
return
}
}
Expand Down

0 comments on commit a482fc4

Please sign in to comment.