Respect xargo override from toml
@@ -249,14 +249,12 @@ fn run() -> Result<ExitStatus> {
}
let available_targets = rustup::available_targets(&toolchain, verbose)?;
- let uses_xargo = !target.is_builtin() ||
- !available_targets.contains(&target) ||
- if let Some(toml) = toml.as_ref() {
+ let uses_xargo = if let Some(toml) = toml.as_ref() {
toml.xargo(&target)?
} else {
None
}
- .unwrap_or(false);
+ .unwrap_or_else(|| !target.is_builtin() || !available_targets.contains(&target));
if !uses_xargo && !available_targets.is_installed(&target) {
rustup::install(&target, &toolchain, verbose)?;
