updated with correct message

This commit is contained in:
Shubham Tiwari 2022-03-31 07:03:25 +05:30
parent 14d9168a6b
commit 5d5e936b67
4 changed files with 4 additions and 4 deletions

View file

@ -46,7 +46,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 =
'This runner is not configured to use 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);

View file

@ -9225,7 +9225,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('This runner is not configured to use the cache service. Caching will be skipped'); core.warning('The runner was not able to contact the cache service. Caching will be skipped');
} }
return false; return false;
} }

2
dist/setup/index.js vendored
View file

@ -18851,7 +18851,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('This runner is not configured to use the cache service. Caching will be skipped'); core.warning('The runner was not able to contact the cache service. Caching will be skipped');
} }
return false; return false;
} }

View file

@ -92,7 +92,7 @@ export function isCacheFeatureAvailable(): boolean {
); );
} else { } else {
core.warning( core.warning(
'This runner is not configured to use the cache service. Caching will be skipped' 'The runner was not able to contact the cache service. Caching will be skipped'
); );
} }