mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-18 09:31:11 +00:00
work on resolving comments
This commit is contained in:
parent
1c630f9ff8
commit
62e9de96c2
8 changed files with 64 additions and 49 deletions
|
@ -97,11 +97,6 @@ export const getCacheDirectoryPath = async (
|
|||
return stdOut;
|
||||
};
|
||||
|
||||
function logWarning(message: string): void {
|
||||
const warningPrefix = '[warning]';
|
||||
core.info(`${warningPrefix}${message}`);
|
||||
}
|
||||
|
||||
export function isGhes(): boolean {
|
||||
const ghUrl = new URL(
|
||||
process.env['GITHUB_SERVER_URL'] || 'https://github.com'
|
||||
|
@ -112,15 +107,14 @@ export function isGhes(): boolean {
|
|||
export function isCacheFeatureAvailable(): boolean {
|
||||
if (!cache.isFeatureAvailable()) {
|
||||
if (isGhes()) {
|
||||
logWarning(
|
||||
throw new Error(
|
||||
'Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.'
|
||||
);
|
||||
} else {
|
||||
logWarning(
|
||||
throw new Error(
|
||||
'An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.'
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue