Skip to content

Commit

Permalink
fix: Add absolute path for bin
Browse files Browse the repository at this point in the history
fix: Add absolute path for bin
  • Loading branch information
riosje committed Jun 7, 2024
1 parent 3e882b2 commit 1ca68d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions dist/setup/293248747edf5d37944a.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = eval("require")(".");
5 changes: 3 additions & 2 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32721,6 +32721,7 @@ async function setupNsolid({ nodeVersion, nsolidVersion, platform, arch }) {
platform,
arch,
});

let toolPath = await downloadNsolid(metadata);
if (metadata.platform === "win32") {
toolPath = external_path_.join(core.toWin32Path(`${toolPath}/`));
Expand Down Expand Up @@ -32753,6 +32754,7 @@ async function setupNsolid({ nodeVersion, nsolidVersion, platform, arch }) {

async function downloadNsolid(metadata) {
let downloadPath = "";
const extractPath = process.env.RUNNER_TEMP || process.env.RUNNER_WORKSPACE || process.cwd();
const fileName = `nsolid-v${metadata.nsolidVersion}-${metadata.nodeVersion}-${metadata.platform}-${metadata.arch}`;

// If the platform is win32, we need to extract the tarball and move the files to a different location.
Expand All @@ -32765,9 +32767,8 @@ async function downloadNsolid(metadata) {
]);
return toolPath;
}

downloadPath = await tool_cache.downloadTool(metadata.url);
const toolPath = await tool_cache.extractTar(downloadPath, fileName, ["xz", "--strip", "1"]);
const toolPath = await tool_cache.extractTar(downloadPath, `${extractPath}/${fileName}`, ["xz", "--strip", "1"]);
return toolPath;
}

Expand Down
5 changes: 3 additions & 2 deletions src/lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export async function setupNsolid({ nodeVersion, nsolidVersion, platform, arch }
platform,
arch,
});

let toolPath = await downloadNsolid(metadata);
if (metadata.platform === "win32") {
toolPath = path.join(core.toWin32Path(`${toolPath}/`));
Expand Down Expand Up @@ -43,6 +44,7 @@ export async function setupNsolid({ nodeVersion, nsolidVersion, platform, arch }

async function downloadNsolid(metadata) {
let downloadPath = "";
const extractPath = process.env.RUNNER_TEMP || process.env.RUNNER_WORKSPACE || process.cwd();
const fileName = `nsolid-v${metadata.nsolidVersion}-${metadata.nodeVersion}-${metadata.platform}-${metadata.arch}`;

// If the platform is win32, we need to extract the tarball and move the files to a different location.
Expand All @@ -55,8 +57,7 @@ async function downloadNsolid(metadata) {
]);
return toolPath;
}

downloadPath = await tc.downloadTool(metadata.url);
const toolPath = await tc.extractTar(downloadPath, fileName, ["xz", "--strip", "1"]);
const toolPath = await tc.extractTar(downloadPath, `${extractPath}/${fileName}`, ["xz", "--strip", "1"]);
return toolPath;
}

0 comments on commit 1ca68d2

Please sign in to comment.