mirror of
https://github.com/actions/setup-java.git
synced 2025-08-19 04:49:54 +08:00
Upgrade Node to v20 (#558)
* Build changes * 4.0.0 * node version update * changes * upgrade to v20 * Removing conflicts * Upgrade to v20 in the reusable workflows * Rebased index.js * Removing conflicts * Resolving conflicts * Fomat check * failed checks fix
This commit is contained in:
@@ -149,10 +149,12 @@ export async function save(id: string) {
|
||||
await cache.saveCache(packageManager.path, primaryKey);
|
||||
core.info(`Cache saved with the key: ${primaryKey}`);
|
||||
} catch (error) {
|
||||
if (error.name === cache.ReserveCacheError.name) {
|
||||
core.info(error.message);
|
||||
const err = error as Error;
|
||||
|
||||
if (err.name === cache.ReserveCacheError.name) {
|
||||
core.info(err.message);
|
||||
} else {
|
||||
if (isProbablyGradleDaemonProblem(packageManager, error)) {
|
||||
if (isProbablyGradleDaemonProblem(packageManager, err)) {
|
||||
core.warning(
|
||||
'Failed to save Gradle cache on Windows. If tar.exe reported "Permission denied", try to run Gradle with `--no-daemon` option. Refer to https://github.com/actions/cache/issues/454 for details.'
|
||||
);
|
||||
|
@@ -13,7 +13,9 @@ async function removePrivateKeyFromKeychain() {
|
||||
);
|
||||
await gpg.deleteKey(keyFingerprint);
|
||||
} catch (error) {
|
||||
core.setFailed(`Failed to remove private key due to: ${error.message}`);
|
||||
core.setFailed(
|
||||
`Failed to remove private key due to: ${(error as Error).message}`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -206,7 +206,9 @@ export class DragonwellDistribution extends JavaBase {
|
||||
return fetchedDragonwellJson;
|
||||
} catch (err) {
|
||||
core.debug(
|
||||
`Fetching Dragonwell versions info from the primary link: ${primaryUrl} ended up with the error: ${err.message}`
|
||||
`Fetching Dragonwell versions info from the primary link: ${primaryUrl} ended up with the error: ${
|
||||
(err as Error).message
|
||||
}`
|
||||
);
|
||||
return null;
|
||||
}
|
||||
@@ -232,7 +234,9 @@ export class DragonwellDistribution extends JavaBase {
|
||||
return fetchedDragonwellJson;
|
||||
} catch (err) {
|
||||
core.debug(
|
||||
`Fetching Dragonwell versions info from the backup url: ${backupUrl} ended up with the error: ${err.message}`
|
||||
`Fetching Dragonwell versions info from the backup url: ${backupUrl} ended up with the error: ${
|
||||
(err as Error).message
|
||||
}`
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ import * as core from '@actions/core';
|
||||
import * as tc from '@actions/tool-cache';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import {ITypedResponse} from '@actions/http-client/interfaces';
|
||||
import {TypedResponse} from '@actions/http-client/lib/interfaces';
|
||||
|
||||
export class MicrosoftDistributions extends JavaBase {
|
||||
constructor(installerOptions: JavaInstallerOptions) {
|
||||
@@ -99,7 +99,7 @@ export class MicrosoftDistributions extends JavaBase {
|
||||
|
||||
const headers = getGitHubHttpHeaders();
|
||||
|
||||
let response: ITypedResponse<tc.IToolRelease[]> | null = null;
|
||||
let response: TypedResponse<tc.IToolRelease[]> | null = null;
|
||||
|
||||
if (core.isDebug()) {
|
||||
console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console
|
||||
|
@@ -79,7 +79,7 @@ async function run() {
|
||||
await restore(cache, cacheDependencyPath);
|
||||
}
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
core.setFailed((error as Error).message);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user