diff --git a/packages/cache/src/internal/cacheHttpClient.ts b/packages/cache/src/internal/cacheHttpClient.ts index 879d73f079..fd74f6b83a 100644 --- a/packages/cache/src/internal/cacheHttpClient.ts +++ b/packages/cache/src/internal/cacheHttpClient.ts @@ -43,7 +43,7 @@ function getCacheApiUrl(resource: string): string { throw new Error('Cache Service Url not found, unable to restore cache.') } - const url = `${baseUrl}_apis/artifactcache/${resource}` + const url = `${baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`}_apis/artifactcache/${resource}` core.debug(`Resource Url: ${url}`) return url }