Skip to content

Commit

Permalink
Respect xargo override from toml
Browse files Browse the repository at this point in the history
  • Loading branch information
anupdhml committed Jun 4, 2020
1 parent 7d09c5e commit aeaf3f1
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
toml.xargo(&target)?
} else {
None
}
.unwrap_or(false);
let uses_xargo = if let Some(toml) = toml.as_ref() {
toml.xargo(&target)?
} else {
None
}
.unwrap_or_else(|| !target.is_builtin() || !available_targets.contains(&target));

if !uses_xargo && !available_targets.is_installed(&target) {
rustup::install(&target, &toolchain, verbose)?;
Expand Down

0 comments on commit aeaf3f1

Please sign in to comment.