diff --git a/cargo-dist/src/build/cargo.rs b/cargo-dist/src/build/cargo.rs index 0a1badddb..c3d0be405 100644 --- a/cargo-dist/src/build/cargo.rs +++ b/cargo-dist/src/build/cargo.rs @@ -185,18 +185,18 @@ pub fn make_build_cargo_target_command( let mut command = Cmd::new(cargo_cmd, "build your app with Cargo"); if auditable { command.arg("auditable"); - if wrapper.is_some() { - return Err(DistError::CannotDoCargoAuditableAndCrossCompile { - host: host.to_owned(), - target, - }); - } } match wrapper { None => { command.arg("build"); } Some(CargoBuildWrapper::ZigBuild) => { + if auditable { + return Err(DistError::CannotDoCargoAuditableAndCrossCompile { + host: host.to_owned(), + target, + }); + } command.arg("zigbuild"); } Some(CargoBuildWrapper::Xwin) => {