fix(cli): add back override cargo by env (#1605)

This commit is contained in:
LongYinan 2023-05-27 12:08:59 +08:00 committed by GitHub
parent c7d6ee6e4b
commit e60b1a599b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -150,7 +150,8 @@ class Builder {
const controller = new AbortController()
const buildTask = new Promise<void>((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,