File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
pkg/asset/installconfig/aws Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -210,17 +210,19 @@ func ValidateCreds(ssn *session.Session) error {
210
210
if err != nil {
211
211
return errors .Wrap (err , "mint credentials check" )
212
212
}
213
+ if canMint {
214
+ return nil
215
+ }
213
216
214
217
// Check whether we can use the current credentials in passthrough mode to satisfy
215
218
// cluster services needing to interact with the cloud
216
219
canPassthrough , err := credvalidator .CheckCloudCredPassthrough (client , logger )
217
220
if err != nil {
218
221
return errors .Wrap (err , "passthrough credentials check" )
219
222
}
220
-
221
- if ! canMint && ! canPassthrough {
222
- return errors .New ("AWS credentials cannot be used to either create new creds or use as-is" )
223
+ if canPassthrough {
224
+ return nil
223
225
}
224
226
225
- return nil
227
+ return errors . New ( "AWS credentials cannot be used to either create new creds or use as-is" )
226
228
}
You can’t perform that action at this time.
0 commit comments