mirror of
https://github.com/actions/toolkit
synced 2025-05-09 08:33:00 +00:00
minor
This commit is contained in:
parent
a71585a450
commit
f05c940e43
2 changed files with 2 additions and 6 deletions
2
packages/cache/src/cache.ts
vendored
2
packages/cache/src/cache.ts
vendored
|
@ -49,7 +49,7 @@ function checkKey(key: string): void {
|
||||||
* @returns boolean return true if Actions cache service feature is available, otherwise false
|
* @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']
|
return !!process.env['ACTIONS_CACHE_URL']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,11 +32,7 @@ const versionSalt = '1.0'
|
||||||
|
|
||||||
function getCacheApiUrl(resource: string): string {
|
function getCacheApiUrl(resource: string): string {
|
||||||
// Ideally we just use ACTIONS_CACHE_URL
|
// Ideally we just use ACTIONS_CACHE_URL
|
||||||
const baseUrl: string = (
|
const baseUrl: string = process.env['ACTIONS_CACHE_URL'] || ''
|
||||||
process.env['ACTIONS_CACHE_URL'] ||
|
|
||||||
process.env['ACTIONS_RUNTIME_URL'] ||
|
|
||||||
''
|
|
||||||
).replace('pipelines', 'artifactcache')
|
|
||||||
if (!baseUrl) {
|
if (!baseUrl) {
|
||||||
throw new Error('Cache Service Url not found, unable to restore cache.')
|
throw new Error('Cache Service Url not found, unable to restore cache.')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue