Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
dsame committed Oct 20, 2022
1 parent de50e75 commit 63afba9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
7 changes: 3 additions & 4 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66763,16 +66763,15 @@ function installCpythonFromRelease(release) {
yield 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);
}
}
Expand Down
9 changes: 3 additions & 6 deletions src/install-python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 63afba9

Please sign in to comment.