use async version

This commit is contained in:
Alex.F 2021-08-16 00:19:45 +08:00
parent c943057038
commit d13f6ba750
3 changed files with 28 additions and 20 deletions

View file

@ -107,7 +107,8 @@ export async function buildCargoTask(
// Check whether we must use a user-defined substitute for cargo.
// Split on spaces to allow overrides like "wrapper cargo".
const overrideCargo = definition.overrideCargo ?? definition.overrideCargo;
const cargoCommand = overrideCargo?.split(" ") ?? [toolchain.cargoPath()];
const cargoPath = await toolchain.cargoPath();
const cargoCommand = overrideCargo?.split(" ") ?? [cargoPath];
const fullCommand = [...cargoCommand, ...args];