fix eslint issue (#928)

This commit is contained in:
Tim Finnigan
2023-11-22 11:30:19 -08:00
committed by GitHub
parent cd299def7b
commit e5170cf58c
+5 -11
View File
@@ -151,22 +151,16 @@ export async function assumeRole(params: assumeRoleParams) {
const stsClient = credentialsClient.stsClient; const stsClient = credentialsClient.stsClient;
// Assume role using one of three methods // Assume role using one of three methods
switch (true) { if (!!webIdentityToken) {
case !!webIdentityToken: { return assumeRoleWithOIDC(commonAssumeRoleParams, stsClient, webIdentityToken);
return assumeRoleWithOIDC(commonAssumeRoleParams, stsClient, webIdentityToken!); } else if (!!webIdentityTokenFile) {
}
case !!webIdentityTokenFile: {
return assumeRoleWithWebIdentityTokenFile( return assumeRoleWithWebIdentityTokenFile(
commonAssumeRoleParams, commonAssumeRoleParams,
stsClient, stsClient,
webIdentityTokenFile!, webIdentityTokenFile,
GITHUB_WORKSPACE GITHUB_WORKSPACE
); );
} } else {
default: {
return assumeRoleWithCredentials(commonAssumeRoleParams, stsClient); return assumeRoleWithCredentials(commonAssumeRoleParams, stsClient);
} }
} }
}