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
+11 -17
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) {
} return assumeRoleWithWebIdentityTokenFile(
commonAssumeRoleParams,
case !!webIdentityTokenFile: { stsClient,
return assumeRoleWithWebIdentityTokenFile( webIdentityTokenFile,
commonAssumeRoleParams, GITHUB_WORKSPACE
stsClient, );
webIdentityTokenFile!, } else {
GITHUB_WORKSPACE return assumeRoleWithCredentials(commonAssumeRoleParams, stsClient);
);
}
default: {
return assumeRoleWithCredentials(commonAssumeRoleParams, stsClient);
}
} }
} }