File tree 2 files changed +6
-10
lines changed
2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -66741,16 +66741,15 @@ function installCpythonFromRelease(release) {
66741
66741
yield installPython(pythonExtractedFolder);
66742
66742
}
66743
66743
catch (err) {
66744
- if (err instanceof Error ) {
66744
+ if (err instanceof tc.HTTPError ) {
66745
66745
// Rate limit?
66746
- if (err instanceof tc.HTTPError &&
66747
- (err.httpStatusCode === 403 || err.httpStatusCode === 429)) {
66746
+ if (err.httpStatusCode === 403 || err.httpStatusCode === 429) {
66748
66747
core.info(`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`);
66749
66748
}
66750
66749
else {
66751
66750
core.info(err.message);
66752
66751
}
66753
- if (err.stack !== undefined ) {
66752
+ if (err.stack) {
66754
66753
core.debug(err.stack);
66755
66754
}
66756
66755
}
Original file line number Diff line number Diff line change @@ -86,19 +86,16 @@ export async function installCpythonFromRelease(release: tc.IToolRelease) {
86
86
core . info ( 'Execute installation script' ) ;
87
87
await installPython ( pythonExtractedFolder ) ;
88
88
} catch ( err ) {
89
- if ( err instanceof Error ) {
89
+ if ( err instanceof tc . HTTPError ) {
90
90
// 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 ) {
95
92
core . info (
96
93
`Received HTTP status code ${ err . httpStatusCode } . This usually indicates the rate limit has been exceeded`
97
94
) ;
98
95
} else {
99
96
core . info ( err . message ) ;
100
97
}
101
- if ( err . stack !== undefined ) {
98
+ if ( err . stack ) {
102
99
core . debug ( err . stack ) ;
103
100
}
104
101
}
You can’t perform that action at this time.
0 commit comments