From f05c940e43da385578b33fe30b4211b5b35b962b Mon Sep 17 00:00:00 2001 From: Deepak Dahiya <59823596+t-dedah@users.noreply.github.com> Date: Tue, 29 Mar 2022 22:20:22 +0000 Subject: [PATCH] minor --- packages/cache/src/cache.ts | 2 +- packages/cache/src/internal/cacheHttpClient.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/cache/src/cache.ts b/packages/cache/src/cache.ts index 687984ad..c003310a 100644 --- a/packages/cache/src/cache.ts +++ b/packages/cache/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/packages/cache/src/internal/cacheHttpClient.ts b/packages/cache/src/internal/cacheHttpClient.ts index e0f33bb0..ac6098d1 100644 --- a/packages/cache/src/internal/cacheHttpClient.ts +++ b/packages/cache/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.') }