@@ -59965,7 +59965,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
59965
59965
return (mod && mod.__esModule) ? mod : { "default": mod };
59966
59966
};
59967
59967
Object.defineProperty(exports, "__esModule", ({ value: true }));
59968
- exports.logWarning = exports. run = void 0;
59968
+ exports.run = void 0;
59969
59969
const core = __importStar(__nccwpck_require__(2186));
59970
59970
const cache = __importStar(__nccwpck_require__(7799));
59971
59971
const fs_1 = __importDefault(__nccwpck_require__(7147));
@@ -59984,7 +59984,14 @@ function run() {
59984
59984
yield cachePackages();
59985
59985
}
59986
59986
catch (error) {
59987
- core.setFailed(error.message);
59987
+ let message = 'Unknown error!';
59988
+ if (error instanceof Error) {
59989
+ message = error.message;
59990
+ }
59991
+ if (typeof error === 'string') {
59992
+ message = error;
59993
+ }
59994
+ core.setFailed(message);
59988
59995
}
59989
59996
});
59990
59997
}
@@ -60002,9 +60009,7 @@ const cachePackages = () => __awaiter(void 0, void 0, void 0, function* () {
60002
60009
const nonExistingPaths = cachePaths.filter(cachePath => !fs_1.default.existsSync(cachePath));
60003
60010
if (nonExistingPaths.length === cachePaths.length) {
60004
60011
core.warning(`There are no cache folders on the disk`);
60005
- logWarning(`There are no cache folders on the disk`);
60006
60012
return;
60007
- throw new Error(`There are no cache folders on the disk`);
60008
60013
}
60009
60014
if (nonExistingPaths.length) {
60010
60015
logWarning(`Cache folder path is retrieved but doesn't exist on disk: ${nonExistingPaths.join(', ')}`);
@@ -60023,7 +60028,6 @@ function logWarning(message) {
60023
60028
const warningPrefix = '[warning]';
60024
60029
core.info(`${warningPrefix}${message}`);
60025
60030
}
60026
- exports.logWarning = logWarning;
60027
60031
run();
60028
60032
60029
60033
0 commit comments