From fbddfe7565af543a03d69aa583d213d1aba4196c Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Thu, 20 Oct 2022 19:34:00 +0200 Subject: [PATCH] Fix styling --- src/install-python.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/install-python.ts b/src/install-python.ts index ec796c902..2af61291d 100644 --- a/src/install-python.ts +++ b/src/install-python.ts @@ -86,19 +86,16 @@ export async function installCpythonFromRelease(release: tc.IToolRelease) { core.info('Execute installation script'); await installPython(pythonExtractedFolder); } catch (err) { - if (err instanceof Error) { + if (err instanceof tc.HTTPError) { // Rate limit? - if ( - err instanceof tc.HTTPError && - (err.httpStatusCode === 403 || err.httpStatusCode === 429) - ) { + if (err.httpStatusCode === 403 || err.httpStatusCode === 429) { core.info( `Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded` ); } else { core.info(err.message); } - if (err.stack !== undefined) { + if (err.stack) { core.debug(err.stack); } }