diff --git a/dist/index.js b/dist/index.js index b3c57d3..ffde1c2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3914,10 +3914,9 @@ async function main() { const rendered = url.replace(/\{(\w+?)\}/g, (a, match) => { return context[match] || ""; }); - const dirName = rendered.substr(9, rendered.lastIndexOf("/")); + const dirName = rendered.substr(0, rendered.lastIndexOf("/")); const downloadPath = await import_tool_cache.default.downloadTool(rendered); - const downloadedPath = await (0, import_tool_cache.extractZip)(downloadPath); - (0, import_core.debug)("downloadedpath: " + downloadedPath); + await (0, import_tool_cache.extractZip)(downloadPath); const extractedPath = import_path.default.join(dirName, FILENAME); toolPath = await import_tool_cache.default.cacheFile(extractedPath, FILENAME, FILENAME, version); } diff --git a/index.ts b/index.ts index fc7f3a0..f40a380 100644 --- a/index.ts +++ b/index.ts @@ -28,12 +28,13 @@ async function main() { const rendered = url.replace(/\{(\w+?)\}/g, (a, match) => { return context[match] || ""; }); - const dirName = rendered.substr(9, rendered.lastIndexOf("/")); + const dirName = rendered.substr(0, rendered.lastIndexOf("/")); const downloadPath = await cache.downloadTool(rendered); - const downloadedPath = await extractZip(downloadPath); - debug("downloadedpath: " + downloadedPath); + await extractZip(downloadPath); + const extractedPath = path.join(dirName, FILENAME); + toolPath = await cache.cacheFile( extractedPath, FILENAME,