mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 15:32:13 +00:00
Fix styling
This commit is contained in:
parent
de50e7576c
commit
63afba950b
2 changed files with 6 additions and 10 deletions
7
dist/setup/index.js
vendored
7
dist/setup/index.js
vendored
|
@ -66763,16 +66763,15 @@ function installCpythonFromRelease(release) {
|
||||||
yield installPython(pythonExtractedFolder);
|
yield installPython(pythonExtractedFolder);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
if (err instanceof Error) {
|
if (err instanceof tc.HTTPError) {
|
||||||
// Rate limit?
|
// Rate limit?
|
||||||
if (err instanceof tc.HTTPError &&
|
if (err.httpStatusCode === 403 || err.httpStatusCode === 429) {
|
||||||
(err.httpStatusCode === 403 || err.httpStatusCode === 429)) {
|
|
||||||
core.info(`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`);
|
core.info(`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.info(err.message);
|
core.info(err.message);
|
||||||
}
|
}
|
||||||
if (err.stack !== undefined) {
|
if (err.stack) {
|
||||||
core.debug(err.stack);
|
core.debug(err.stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,19 +86,16 @@ export async function installCpythonFromRelease(release: tc.IToolRelease) {
|
||||||
core.info('Execute installation script');
|
core.info('Execute installation script');
|
||||||
await installPython(pythonExtractedFolder);
|
await installPython(pythonExtractedFolder);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof Error) {
|
if (err instanceof tc.HTTPError) {
|
||||||
// Rate limit?
|
// Rate limit?
|
||||||
if (
|
if (err.httpStatusCode === 403 || err.httpStatusCode === 429) {
|
||||||
err instanceof tc.HTTPError &&
|
|
||||||
(err.httpStatusCode === 403 || err.httpStatusCode === 429)
|
|
||||||
) {
|
|
||||||
core.info(
|
core.info(
|
||||||
`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`
|
`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
core.info(err.message);
|
core.info(err.message);
|
||||||
}
|
}
|
||||||
if (err.stack !== undefined) {
|
if (err.stack) {
|
||||||
core.debug(err.stack);
|
core.debug(err.stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue