diff --git a/lib/main.js b/lib/main.js index 46345e0f..3bc079ca 100644 --- a/lib/main.js +++ b/lib/main.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -53,15 +57,13 @@ function run() { core.info(`Retrying after ${retryAfter} seconds.`); return true; }, - } }, utils_1.getOctokitOptions(token))); + } }, (0, utils_1.getOctokitOptions)(token))); const repo = core.getInput("repo"); if (!repo) { throw new Error(`Repo was not specified`); } - const tag = core.getInput("tag"); - if (!tag) { - throw new Error(`Tag not specified`); - } + let tag = core.getInput("tag"); + tag = !tag ? "latest" : tag; const cacheEnabled = (core.getInput("cache") === "enable") && tag !== "latest" && tag !== ""; @@ -139,12 +141,10 @@ function run() { osArch: osArch, osPlatform: osPlatform }; - // first candidate folder where to find the binaries - // after downloading the release let dest = toolPath(toolInfo); - // If the user has specified a custom bin location, it means - // that the archive contains a folder with the binaries. - // In this case, we need to use that folder and add it to the path. + // If the user has specified a custom location where the binaries are in the release + // asset, we need to use modify the default path, joining the custom folder to the + // default path. let binariesLocation = core.getInput("binaries-location"); let finalBinLocation = dest; if (binariesLocation !== "") { @@ -232,7 +232,7 @@ function run() { // parameter then this is where we apply those. // Regardless of any rename-to parameter we still need to move the download to the actual destination // otherwise it won't end up on the path as expected - core.warning(`Release asset ${asset.name} did not have a recognised file extension, unable to automatically extract it`); + core.info(`Release asset ${asset.name} did not have a recognised file extension, unable to automatically extract it`); try { fs.mkdirSync(dest, { 'recursive': true }); const outputPath = path.join(dest, renameTo !== "" ? renameTo : path.basename(binPath)); diff --git a/src/main.ts b/src/main.ts index faa8ae84..2c2953f4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -236,7 +236,7 @@ async function run() { // parameter then this is where we apply those. // Regardless of any rename-to parameter we still need to move the download to the actual destination // otherwise it won't end up on the path as expected - core.warning( + core.info( `Release asset ${asset.name} did not have a recognised file extension, unable to automatically extract it`) try { fs.mkdirSync(dest, { 'recursive': true });