mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
linting
This commit is contained in:
parent
5d5e936b67
commit
16f95dd59b
2 changed files with 2 additions and 5 deletions
|
@ -45,8 +45,7 @@ describe('isCacheFeatureAvailable', () => {
|
||||||
it('isCacheFeatureAvailable disabled on dotcom', () => {
|
it('isCacheFeatureAvailable disabled on dotcom', () => {
|
||||||
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 = 'The runner was not able to contact the cache service. Caching will be skipped';
|
||||||
'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);
|
||||||
|
|
|
@ -91,9 +91,7 @@ export function isCacheFeatureAvailable(): boolean {
|
||||||
'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.'
|
'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(
|
core.warning('The runner was not able to contact the cache service. Caching will be skipped');
|
||||||
'The runner was not able to contact the cache service. Caching will be skipped'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue