Loading dist/setup/index.js +8 −18 Changes for dist/setup/index.js: 8 added lines, 18 removed lines. Original line number Diff line number Diff line Loading @@ -128801,36 +128801,26 @@ class JavaBase { } else { core.info('Trying to download...'); try { foundJava = yield this.downloadTool(javaRelease); core.info(`Java ${foundJava.version} was downloaded`); } catch (downloadError) { core.error('Failed to download Java. Please check your network connection or the provided version.'); core.error(`Error details: ${downloadError.message}`); throw downloadError; } } } catch (resolveError) { if (resolveError instanceof tc.HTTPError && resolveError.httpStatusCode === 403) { catch (error) { if (error instanceof tc.HTTPError && error.httpStatusCode === 403) { core.error(`Received HTTP 403: Permission denied or restricted access.`); } else if (resolveError instanceof tc.HTTPError && resolveError.httpStatusCode === 429) { else if (error instanceof tc.HTTPError && error.httpStatusCode === 429) { core.warning(`Received HTTP 429: Rate limit exceeded. Try again later.`); } else { const message = resolveError instanceof Error ? resolveError.message : JSON.stringify(resolveError); const message = error instanceof Error ? error.message : JSON.stringify(error); core.error(`Failed to set up Java due to a network issue or timeout: ${message}`); } if (resolveError instanceof Error && resolveError.stack) { core.debug(resolveError.stack); if (error instanceof Error && error.stack) { core.debug(error.stack); } throw resolveError; throw error; } } // JDK folder may contain postfix "Contents/Home" on macOS src/distributions/base-installer.ts +8 −21 Changes for src/distributions/base-installer.ts: 8 added lines, 21 removed lines. Original line number Diff line number Diff line Loading @@ -58,46 +58,33 @@ export abstract class JavaBase { core.info(`Resolved Java ${foundJava.version} from tool-cache`); } else { core.info('Trying to download...'); try { foundJava = await this.downloadTool(javaRelease); core.info(`Java ${foundJava.version} was downloaded`); } catch (downloadError: any) { core.error( 'Failed to download Java. Please check your network connection or the provided version.' ); core.error(`Error details: ${downloadError.message}`); throw downloadError; } } } catch (resolveError: any) { if ( resolveError instanceof tc.HTTPError && resolveError.httpStatusCode === 403 ) { } catch (error: any) { if (error instanceof tc.HTTPError && error.httpStatusCode === 403) { core.error( `Received HTTP 403: Permission denied or restricted access.` ); } else if ( resolveError instanceof tc.HTTPError && resolveError.httpStatusCode === 429 error instanceof tc.HTTPError && error.httpStatusCode === 429 ) { core.warning( `Received HTTP 429: Rate limit exceeded. Try again later.` ); } else { const message = resolveError instanceof Error ? resolveError.message : JSON.stringify(resolveError); error instanceof Error ? error.message : JSON.stringify(error); core.error( `Failed to set up Java due to a network issue or timeout: ${message}` ); } if (resolveError instanceof Error && resolveError.stack) { core.debug(resolveError.stack); if (error instanceof Error && error.stack) { core.debug(error.stack); } throw resolveError; throw error; } } Loading Loading
dist/setup/index.js +8 −18 Changes for dist/setup/index.js: 8 added lines, 18 removed lines. Original line number Diff line number Diff line Loading @@ -128801,36 +128801,26 @@ class JavaBase { } else { core.info('Trying to download...'); try { foundJava = yield this.downloadTool(javaRelease); core.info(`Java ${foundJava.version} was downloaded`); } catch (downloadError) { core.error('Failed to download Java. Please check your network connection or the provided version.'); core.error(`Error details: ${downloadError.message}`); throw downloadError; } } } catch (resolveError) { if (resolveError instanceof tc.HTTPError && resolveError.httpStatusCode === 403) { catch (error) { if (error instanceof tc.HTTPError && error.httpStatusCode === 403) { core.error(`Received HTTP 403: Permission denied or restricted access.`); } else if (resolveError instanceof tc.HTTPError && resolveError.httpStatusCode === 429) { else if (error instanceof tc.HTTPError && error.httpStatusCode === 429) { core.warning(`Received HTTP 429: Rate limit exceeded. Try again later.`); } else { const message = resolveError instanceof Error ? resolveError.message : JSON.stringify(resolveError); const message = error instanceof Error ? error.message : JSON.stringify(error); core.error(`Failed to set up Java due to a network issue or timeout: ${message}`); } if (resolveError instanceof Error && resolveError.stack) { core.debug(resolveError.stack); if (error instanceof Error && error.stack) { core.debug(error.stack); } throw resolveError; throw error; } } // JDK folder may contain postfix "Contents/Home" on macOS
src/distributions/base-installer.ts +8 −21 Changes for src/distributions/base-installer.ts: 8 added lines, 21 removed lines. Original line number Diff line number Diff line Loading @@ -58,46 +58,33 @@ export abstract class JavaBase { core.info(`Resolved Java ${foundJava.version} from tool-cache`); } else { core.info('Trying to download...'); try { foundJava = await this.downloadTool(javaRelease); core.info(`Java ${foundJava.version} was downloaded`); } catch (downloadError: any) { core.error( 'Failed to download Java. Please check your network connection or the provided version.' ); core.error(`Error details: ${downloadError.message}`); throw downloadError; } } } catch (resolveError: any) { if ( resolveError instanceof tc.HTTPError && resolveError.httpStatusCode === 403 ) { } catch (error: any) { if (error instanceof tc.HTTPError && error.httpStatusCode === 403) { core.error( `Received HTTP 403: Permission denied or restricted access.` ); } else if ( resolveError instanceof tc.HTTPError && resolveError.httpStatusCode === 429 error instanceof tc.HTTPError && error.httpStatusCode === 429 ) { core.warning( `Received HTTP 429: Rate limit exceeded. Try again later.` ); } else { const message = resolveError instanceof Error ? resolveError.message : JSON.stringify(resolveError); error instanceof Error ? error.message : JSON.stringify(error); core.error( `Failed to set up Java due to a network issue or timeout: ${message}` ); } if (resolveError instanceof Error && resolveError.stack) { core.debug(resolveError.stack); if (error instanceof Error && error.stack) { core.debug(error.stack); } throw resolveError; throw error; } } Loading