Skip to content

Commit

Permalink
workaround for #91
Browse files Browse the repository at this point in the history
  • Loading branch information
lukka committed Oct 7, 2023
1 parent 8be6cca commit ed93511
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10,686 deletions.
12 changes: 11 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const core = __nccwpck_require__(2186);
const io = __nccwpck_require__(7436);
const tools = __nccwpck_require__(7784);
const path = __nccwpck_require__(1017);
const fs = __nccwpck_require__(7147);
const semver_1 = __nccwpck_require__(1383);
const catalog = __nccwpck_require__(5284);
const shared = __nccwpck_require__(6946);
Expand Down Expand Up @@ -265,7 +266,16 @@ class ToolsGetter {
return __awaiter(this, void 0, void 0, function* () {
let outPath;
yield core.group("Downloading and extracting CMake", () => __awaiter(this, void 0, void 0, function* () {
const downloaded = yield tools.downloadTool(cmakePackage.url);
let downloaded = yield tools.downloadTool(cmakePackage.url);
// Fix up the path for https://github.com/actions/toolkit/issues/1179
if (process.platform === 'win32') {
const zipExtension = ".zip";
if (path.extname(downloaded) !== zipExtension) {
const downloadedZip = downloaded + zipExtension;
fs.renameSync(downloaded, downloadedZip);
downloaded = downloadedZip;
}
}
yield extractFunction[cmakePackage.dropSuffix](downloaded, outputPath);
}));
yield core.group("Downloading and extracting Ninja", () => __awaiter(this, void 0, void 0, function* () {
Expand Down
Loading

0 comments on commit ed93511

Please sign in to comment.