From df697ca73d3f49db35fc2874bbbd9ea1ab5a3e1c Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 6 Mar 2024 18:08:33 +0100 Subject: [PATCH] fix: Install target from repo's Rust toolchain (#18) --- dist/build-crates-artifacts-main.js | 2 +- dist/build-crates-debian-main.js | 2 +- src/build-crates-artifacts.ts | 2 +- src/build-crates-debian.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/build-crates-artifacts-main.js b/dist/build-crates-artifacts-main.js index 21a15a5..6855e14 100644 --- a/dist/build-crates-artifacts-main.js +++ b/dist/build-crates-artifacts-main.js @@ -128433,7 +128433,7 @@ async function main(input) { command_sh(`git clone --recursive --branch ${input.branch} --single-branch ${remote}`); const crossContents = await promises_.readFile(external_path_.join(repo, "Cross.toml"), "utf-8"); const crossManifest = parse(crossContents); - command_sh(`rustup target add ${input.target}`); + command_sh(`rustup target add ${input.target}`, { cwd: repo }); if (input.target in crossManifest.target) { command_sh(`cross build --release --bins --lib --target ${input.target}`, { cwd: repo, diff --git a/dist/build-crates-debian-main.js b/dist/build-crates-debian-main.js index b211132..1a3d0d4 100644 --- a/dist/build-crates-debian-main.js +++ b/dist/build-crates-debian-main.js @@ -128430,7 +128430,7 @@ async function main(input) { const repo = input.repo.split("/")[1]; const remote = `https://${input.githubToken}@github.com/${input.repo}.git`; sh(`git clone --recursive --branch ${input.branch} --single-branch ${remote}`); - sh(`rustup target add ${input.target}`); + sh(`rustup target add ${input.target}`, { cwd: repo }); sh(`cross build --release --bins --lib --target ${input.target}`, { cwd: repo, }); diff --git a/src/build-crates-artifacts.ts b/src/build-crates-artifacts.ts index 1ee5f1c..63751e8 100644 --- a/src/build-crates-artifacts.ts +++ b/src/build-crates-artifacts.ts @@ -49,7 +49,7 @@ export async function main(input: Input) { const crossContents = await fs.readFile(path.join(repo, "Cross.toml"), "utf-8"); const crossManifest = toml.parse(crossContents) as CrossManifest; - sh(`rustup target add ${input.target}`); + sh(`rustup target add ${input.target}`, { cwd: repo }); if (input.target in crossManifest.target) { sh(`cross build --release --bins --lib --target ${input.target}`, { diff --git a/src/build-crates-debian.ts b/src/build-crates-debian.ts index ed80439..cd11fdc 100644 --- a/src/build-crates-debian.ts +++ b/src/build-crates-debian.ts @@ -43,7 +43,7 @@ export async function main(input: Input) { const remote = `https://${input.githubToken}@github.com/${input.repo}.git`; sh(`git clone --recursive --branch ${input.branch} --single-branch ${remote}`); - sh(`rustup target add ${input.target}`); + sh(`rustup target add ${input.target}`, { cwd: repo }); sh(`cross build --release --bins --lib --target ${input.target}`, { cwd: repo,