fix eslint issue (#928)

This commit is contained in:
Tim Finnigan 2023-11-22 11:30:19 -08:00 committed by GitHub
commit e5170cf58c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -151,22 +151,16 @@ export async function assumeRole(params: assumeRoleParams) {
const stsClient = credentialsClient.stsClient;
// Assume role using one of three methods
switch (true) {
case !!webIdentityToken: {
return assumeRoleWithOIDC(commonAssumeRoleParams, stsClient, webIdentityToken!);
}
case !!webIdentityTokenFile: {
return assumeRoleWithWebIdentityTokenFile(
commonAssumeRoleParams,
stsClient,
webIdentityTokenFile!,
GITHUB_WORKSPACE
);
}
default: {
return assumeRoleWithCredentials(commonAssumeRoleParams, stsClient);
}
if (!!webIdentityToken) {
return assumeRoleWithOIDC(commonAssumeRoleParams, stsClient, webIdentityToken);
} else if (!!webIdentityTokenFile) {
return assumeRoleWithWebIdentityTokenFile(
commonAssumeRoleParams,
stsClient,
webIdentityTokenFile,
GITHUB_WORKSPACE
);
} else {
return assumeRoleWithCredentials(commonAssumeRoleParams, stsClient);
}
}