Skip to content

Commit

Permalink
linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Tiwari committed Mar 28, 2022
1 parent c5862e2 commit e093ab0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/restore/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37458,9 +37458,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
const cache = __importStar(__webpack_require__(692));
const core = __importStar(__webpack_require__(470));
const constants_1 = __webpack_require__(196);
const cache = __importStar(__webpack_require__(692));
function isGhes() {
const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com");
return ghUrl.hostname.toUpperCase() !== "GITHUB.COM";
Expand Down
2 changes: 1 addition & 1 deletion dist/save/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37458,9 +37458,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
const cache = __importStar(__webpack_require__(692));
const core = __importStar(__webpack_require__(470));
const constants_1 = __webpack_require__(196);
const cache = __importStar(__webpack_require__(692));
function isGhes() {
const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com");
return ghUrl.hostname.toUpperCase() !== "GITHUB.COM";
Expand Down
7 changes: 3 additions & 4 deletions src/utils/actionUtils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as cache from "@actions/cache";
import * as core from "@actions/core";

import { Outputs, RefKey, State } from "../constants";
import * as cache from "@actions/cache";

export function isGhes(): boolean {
const ghUrl = new URL(
Expand Down Expand Up @@ -78,12 +78,11 @@ export function getInputAsInt(

export function isCacheFeatureAvailable(): boolean {
if (!cache.isFeatureAvailable()) {
if (isGhes()){
if (isGhes()) {
logWarning(
"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."
);
}
else{
} else {
logWarning(
"An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."
);
Expand Down

0 comments on commit e093ab0

Please sign in to comment.