Skip to content

Commit

Permalink
fix logic bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilgardis committed Jun 13, 2022
1 parent 66bf016 commit 7422c00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xtask/src/build_docker_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ pub fn build_docker_image(

if ["staging", "trying"]
.iter()
.any(|branch| branch == &ref_name)
.any(|branch| branch != &ref_name)
{
tags.push(format!("{image_name}:edge"));
}
Expand Down Expand Up @@ -159,7 +159,7 @@ pub fn build_docker_image(
println!("::set-output name=image::{}", &tags[0])
}
}
if (std::env::var("GITHUB_ACTIONS").is_ok() || !force) && push {
if !(std::env::var("GITHUB_ACTIONS").is_ok() || !push || force) {
panic!("refusing to push, use --force to override");
}
Ok(())
Expand Down

0 comments on commit 7422c00

Please sign in to comment.