mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 15:32:13 +00:00
Review comment
This commit is contained in:
parent
85413f7a6b
commit
fc72fbdb56
3 changed files with 3 additions and 3 deletions
|
@ -59,7 +59,7 @@ describe('isCacheFeatureAvailable', () => {
|
||||||
jest.spyOn(cache, 'isFeatureAvailable').mockImplementation(() => false);
|
jest.spyOn(cache, 'isFeatureAvailable').mockImplementation(() => false);
|
||||||
const infoMock = jest.spyOn(core, 'warning');
|
const infoMock = jest.spyOn(core, 'warning');
|
||||||
const message =
|
const message =
|
||||||
'An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.';
|
'The runner was not able to contact the cache service. Caching will be skipped';
|
||||||
try {
|
try {
|
||||||
process.env['GITHUB_SERVER_URL'] = 'http://github.com';
|
process.env['GITHUB_SERVER_URL'] = 'http://github.com';
|
||||||
expect(isCacheFeatureAvailable()).toBe(false);
|
expect(isCacheFeatureAvailable()).toBe(false);
|
||||||
|
|
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
|
@ -5679,7 +5679,7 @@ function isCacheFeatureAvailable() {
|
||||||
throw new Error('Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.');
|
throw new Error('Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.warning('An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.');
|
core.warning('The runner was not able to contact the cache service. Caching will be skipped');
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ export function isCacheFeatureAvailable(): boolean {
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
core.warning(
|
core.warning(
|
||||||
'An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.'
|
'The runner was not able to contact the cache service. Caching will be skipped'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue