fix(cli): CARGO env var (#1426)

This commit is contained in:
overlookmotel 2023-01-10 04:30:49 +00:00 committed by GitHub
parent 3d3fa533d9
commit cc53807fe2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -285,7 +285,7 @@ export class BuildCommand extends Command {
})())
const isCrossForMacOS =
triple.platform === 'darwin' && process.platform !== 'darwin'
const cargo = process.env.CARGO ?? isCrossForWin ? 'cargo-xwin' : 'cargo'
const cargo = process.env.CARGO ?? (isCrossForWin ? 'cargo-xwin' : 'cargo')
if (isCrossForWin && triple.arch === 'ia32') {
additionalEnv['XWIN_ARCH'] = 'x86'
}