You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dist/cache-save/index.js
+6-10Lines changed: 6 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -61185,16 +61185,12 @@ function isGhes() {
61185
61185
}
61186
61186
exports.isGhes = isGhes;
61187
61187
function isCacheFeatureAvailable() {
61188
-
if (!cache.isFeatureAvailable()) {
61189
-
if (isGhes()) {
61190
-
throw new Error('Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.');
61191
-
}
61192
-
else {
61193
-
core.warning('The runner was not able to contact the cache service. Caching will be skipped');
61194
-
}
61195
-
return false;
61196
-
}
61197
-
return true;
61188
+
if (cache.isFeatureAvailable())
61189
+
return true;
61190
+
if (isGhes())
61191
+
throw new Error('Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.');
61192
+
core.warning('The runner was not able to contact the cache service. Caching will be skipped');
Copy file name to clipboardExpand all lines: dist/setup/index.js
+6-10Lines changed: 6 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -73139,16 +73139,12 @@ function isGhes() {
73139
73139
}
73140
73140
exports.isGhes = isGhes;
73141
73141
function isCacheFeatureAvailable() {
73142
-
if (!cache.isFeatureAvailable()) {
73143
-
if (isGhes()) {
73144
-
throw new Error('Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.');
73145
-
}
73146
-
else {
73147
-
core.warning('The runner was not able to contact the cache service. Caching will be skipped');
73148
-
}
73149
-
return false;
73150
-
}
73151
-
return true;
73142
+
if (cache.isFeatureAvailable())
73143
+
return true;
73144
+
if (isGhes())
73145
+
throw new Error('Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.');
73146
+
core.warning('The runner was not able to contact the cache service. Caching will be skipped');
Copy file name to clipboardExpand all lines: src/cache-utils.ts
+10-13Lines changed: 10 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -105,19 +105,16 @@ export function isGhes(): boolean {
105
105
}
106
106
107
107
exportfunctionisCacheFeatureAvailable(): boolean{
108
-
if(!cache.isFeatureAvailable()){
109
-
if(isGhes()){
110
-
thrownewError(
111
-
'Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.'
112
-
);
113
-
}else{
114
-
core.warning(
115
-
'The runner was not able to contact the cache service. Caching will be skipped'
116
-
);
117
-
}
108
+
if(cache.isFeatureAvailable())returntrue;
118
109
119
-
returnfalse;
120
-
}
110
+
if(isGhes())
111
+
thrownewError(
112
+
'Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.'
113
+
);
114
+
115
+
core.warning(
116
+
'The runner was not able to contact the cache service. Caching will be skipped'
0 commit comments