Browse Source

Fix logic for when to link

pull/21/head
Steve Cook 2 years ago
parent
commit
eb1d4345b7
  1. 17
      src/lib.rs

17
src/lib.rs

@ -21,13 +21,16 @@ const DEFAULT_MESSAGE_FORMAT: &str = "json-render-diagnostics";
pub fn get_should_link(input: &mut Input) -> bool { pub fn get_should_link(input: &mut Input) -> bool {
// When running compile only commands, don't link the executable to the 3ds. // When running compile only commands, don't link the executable to the 3ds.
// Otherwise, link and run on the 3ds but do not run locally. // Otherwise, link and run on the 3ds but do not run locally.
input.cmd == CargoCommand::Run match input.cmd {
|| (input.cmd == CargoCommand::Test CargoCommand::Run => {
&& if !input.cargo_opts.contains(&"--no-run".to_string()) { true
true }
} else { CargoCommand::Test if !input.cargo_opts.contains(&"--no-run".to_string()) => {
false input.cargo_opts.push("--no-run".to_string());
}) true
}
_ => false
}
} }
/// Extracts the user-defined message format and if there is none, /// Extracts the user-defined message format and if there is none,

Loading…
Cancel
Save