Skip to content

Commit

Permalink
fix: use absolute paths to noirup and bbup
Browse files Browse the repository at this point in the history
  • Loading branch information
olehmisar committed Oct 28, 2024
1 parent 5bde980 commit ef86090
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function installNoirup() {
}

export async function installNargo(version: string) {
await installNoirup();
const noirupBinary = await installNoirup();

const path = await import("path");
const fs = await import("fs");
Expand All @@ -34,7 +34,7 @@ export async function installNargo(version: string) {
fs.mkdirSync(path.join(nargoBinDir), { recursive: true });
console.log(`Installing nargo@${version} in ${nargoBinDir}`);
await runCommand(
`NARGO_HOME=${path.dirname(nargoBinDir)} noirup -v ${version}`,
`NARGO_HOME=${path.dirname(nargoBinDir)} ${noirupBinary} -v ${version}`,
);
}
return nargoBinary;
Expand All @@ -61,7 +61,7 @@ async function installBbup() {
}

export async function installBb(bbVersion: string): Promise<string> {
await installBbup();
const bbupBinary = await installBbup();

const fs = await import("fs");
const path = await import("path");
Expand All @@ -77,7 +77,7 @@ export async function installBb(bbVersion: string): Promise<string> {
const bbDir = path.dirname(bbBinary);
fs.mkdirSync(bbDir, { recursive: true });
console.log(`Installing bb@${bbVersion} in ${bbDir}`);
await runCommand(`BB_HOME=${bbDir} bbup -v ${bbVersion}`);
await runCommand(`BB_HOME=${bbDir} ${bbupBinary} -v ${bbVersion}`);
}
return bbBinary;
}
Expand Down

0 comments on commit ef86090

Please sign in to comment.