diff --git a/src/lib.rs b/src/lib.rs index 045690d..9337deb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -113,11 +113,6 @@ pub fn make_cargo_build_command( let sysroot = find_sysroot(); let mut command = Command::new(cargo); - if !sysroot.join("lib/rustlib/armv6k-nintendo-3ds").exists() { - eprintln!("No pre-build std found, using build-std"); - command.arg("-Z").arg("build-std"); - } - let cmd = match cmd { CargoCommand::Build | CargoCommand::Run => "build", CargoCommand::Test => "test", @@ -137,6 +132,11 @@ pub fn make_cargo_build_command( .stdin(Stdio::inherit()) .stderr(Stdio::inherit()); + if !sysroot.join("lib/rustlib/armv6k-nintendo-3ds").exists() { + eprintln!("No pre-build std found, using build-std"); + command.arg("-Z").arg("build-std"); + } + command }