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 @@ -211,17 +211,19 @@ func ValidateCreds(ssn *session.Session) error {
211
211
if err != nil {
212
212
return errors .Wrap (err , "mint credentials check" )
213
213
}
214
+ if canMint {
215
+ return nil
216
+ }
214
217
215
218
// Check whether we can use the current credentials in passthrough mode to satisfy
216
219
// cluster services needing to interact with the cloud
217
220
canPassthrough , err := credvalidator .CheckCloudCredPassthrough (client , logger )
218
221
if err != nil {
219
222
return errors .Wrap (err , "passthrough credentials check" )
220
223
}
221
-
222
- if ! canMint && ! canPassthrough {
223
- return errors .New ("AWS credentials cannot be used to either create new creds or use as-is" )
224
+ if canPassthrough {
225
+ return nil
224
226
}
225
227
226
- return nil
228
+ return errors . New ( "AWS credentials cannot be used to either create new creds or use as-is" )
227
229
}
You can’t perform that action at this time.
0 commit comments