From e60b1a599b8f3649cafc2908d974565ac95eec2f Mon Sep 17 00:00:00 2001 From: LongYinan Date: Sat, 27 May 2023 12:08:59 +0800 Subject: [PATCH] fix(cli): add back override cargo by env (#1605) --- cli/src/api/build.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/src/api/build.ts b/cli/src/api/build.ts index 57a51ca9..f3a16446 100644 --- a/cli/src/api/build.ts +++ b/cli/src/api/build.ts @@ -150,7 +150,8 @@ class Builder { const controller = new AbortController() const buildTask = new Promise((resolve, reject) => { - const command = this.options.useCross ? 'cross' : 'cargo' + const command = + process.env.CARGO ?? (this.options.useCross ? 'cross' : 'cargo') const buildProcess = spawn(command, this.args, { env: { ...process.env,