Skip to content

Commit fbddfe7

Browse files
committed
Fix styling
1 parent a1df4f3 commit fbddfe7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/install-python.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,16 @@ export async function installCpythonFromRelease(release: tc.IToolRelease) {
8686
core.info('Execute installation script');
8787
await installPython(pythonExtractedFolder);
8888
} catch (err) {
89-
if (err instanceof Error) {
89+
if (err instanceof tc.HTTPError) {
9090
// Rate limit?
91-
if (
92-
err instanceof tc.HTTPError &&
93-
(err.httpStatusCode === 403 || err.httpStatusCode === 429)
94-
) {
91+
if (err.httpStatusCode === 403 || err.httpStatusCode === 429) {
9592
core.info(
9693
`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`
9794
);
9895
} else {
9996
core.info(err.message);
10097
}
101-
if (err.stack !== undefined) {
98+
if (err.stack) {
10299
core.debug(err.stack);
103100
}
104101
}

0 commit comments

Comments
 (0)