Skip to content

Commit

Permalink
fix: change check to local builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mistydemeo committed Dec 18, 2024
1 parent e565f92 commit 5d6c951
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cargo-dist/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,17 @@ mod tests;
pub fn do_env_test(cfg: &Config) -> DistResult<()> {
let (dist, _manifest) = tasks::gather_work(cfg)?;

let global_builds = cfg.artifact_mode == ArtifactMode::Global;
let local_builds = matches!(
cfg.artifact_mode,
ArtifactMode::Local | ArtifactMode::All | ArtifactMode::Host
);

let builds = dist.config.builds;

// cargo-auditable is used only in local builds
let need_cargo_auditable = builds.cargo.cargo_auditable && !global_builds;
let need_cargo_auditable = builds.cargo.cargo_auditable && local_builds;
// cyclonedx is used only in global builds
let need_cargo_cyclonedx = builds.cargo.cargo_cyclonedx && global_builds;
let need_cargo_cyclonedx = builds.cargo.cargo_cyclonedx && !local_builds;
// omnibor is used in both local and global builds
let need_omnibor = builds.omnibor;
let mut need_xwin = false;
Expand Down

0 comments on commit 5d6c951

Please sign in to comment.