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
'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.'
`::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.${osm.EOL}`
731
+
expect(warningSpy).toHaveBeenCalledWith(
732
+
// `::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.${osm.EOL}`
733
+
'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.'
Copy file name to clipboardExpand all lines: dist/cache-save/index.js
+6-8Lines changed: 6 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -61185,16 +61185,14 @@ 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
-
}
61188
+
if (cache.isFeatureAvailable())
61189
+
return true;
61190
+
if (isGhes()) {
61191
+
core.warning('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.');
61195
61192
return false;
61196
61193
}
61197
-
return true;
61194
+
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-8Lines changed: 6 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -73139,16 +73139,14 @@ 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
-
}
73142
+
if (cache.isFeatureAvailable())
73143
+
return true;
73144
+
if (isGhes()) {
73145
+
core.warning('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.');
73149
73146
return false;
73150
73147
}
73151
-
return true;
73148
+
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-11Lines changed: 10 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -105,19 +105,18 @@ 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
110
+
if(isGhes()){
111
+
core.warning(
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
+
);
119
114
returnfalse;
120
115
}
121
116
122
-
returntrue;
117
+
core.warning(
118
+
'The runner was not able to contact the cache service. Caching will be skipped'
0 commit comments