mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
Build changes
This commit is contained in:
parent
78078da0cd
commit
b5706510fa
42 changed files with 18092 additions and 24435 deletions
|
@ -146,10 +146,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
|
||||
|
|
|
@ -76,7 +76,7 @@ async function run() {
|
|||
await restore(cache);
|
||||
}
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
core.setFailed((error as Error).message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue