diff --git a/src/cache.ts b/src/cache.ts index 687984a..c003310 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -49,7 +49,7 @@ function checkKey(key: string): void { * @returns boolean return true if Actions cache service feature is available, otherwise false */ - export function isFeatureAvailable(): boolean { +export function isFeatureAvailable(): boolean { return !!process.env['ACTIONS_CACHE_URL'] } diff --git a/src/internal/cacheHttpClient.ts b/src/internal/cacheHttpClient.ts index e0f33bb..ac6098d 100644 --- a/src/internal/cacheHttpClient.ts +++ b/src/internal/cacheHttpClient.ts @@ -32,11 +32,7 @@ const versionSalt = '1.0' function getCacheApiUrl(resource: string): string { // Ideally we just use ACTIONS_CACHE_URL - const baseUrl: string = ( - process.env['ACTIONS_CACHE_URL'] || - process.env['ACTIONS_RUNTIME_URL'] || - '' - ).replace('pipelines', 'artifactcache') + const baseUrl: string = process.env['ACTIONS_CACHE_URL'] || '' if (!baseUrl) { throw new Error('Cache Service Url not found, unable to restore cache.') }