From 51fd86ed6b94b1196b109930170df3cd7d349dcf Mon Sep 17 00:00:00 2001 From: Gerald Pinder Date: Wed, 26 Mar 2025 14:11:43 -0400 Subject: [PATCH] fix: Fix lints and be sure to login before build in rechunk --- process/drivers/skopeo_driver.rs | 3 +-- process/drivers/traits.rs | 2 ++ src/commands/build.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/process/drivers/skopeo_driver.rs b/process/drivers/skopeo_driver.rs index c5a88e7..acdfa5d 100644 --- a/process/drivers/skopeo_driver.rs +++ b/process/drivers/skopeo_driver.rs @@ -1,6 +1,5 @@ use std::{process::Stdio, time::Duration}; -use blue_build_utils::constants::SUDO_ASKPASS; use cached::proc_macro::cached; use colored::Colorize; use comlexr::cmd; @@ -77,7 +76,7 @@ impl super::OciCopy for SkopeoDriver { } else { "skopeo" }, - if use_sudo && blue_build_utils::has_env_var(SUDO_ASKPASS) => [ + if use_sudo && blue_build_utils::has_env_var(blue_build_utils::constants::SUDO_ASKPASS) => [ "-A", "-p", format!( diff --git a/process/drivers/traits.rs b/process/drivers/traits.rs index 9fbdb55..db757ce 100644 --- a/process/drivers/traits.rs +++ b/process/drivers/traits.rs @@ -287,6 +287,8 @@ pub trait RechunkDriver: RunDriver + BuildDriver + ContainerMountDriver { )) .into_diagnostic()?; + Self::login(true)?; + Self::build( &BuildOpts::builder() .image(raw_image.to_string()) diff --git a/src/commands/build.rs b/src/commands/build.rs index da8e25b..54c2799 100644 --- a/src/commands/build.rs +++ b/src/commands/build.rs @@ -161,7 +161,7 @@ impl BlueBuildCommand for BuildCommand { if self.push { blue_build_utils::check_command_exists("cosign")?; Driver::check_signing_files(&CheckKeyPairOpts::builder().dir(Path::new(".")).build())?; - Driver::login(self.rechunk)?; + Driver::login(false)?; Driver::signing_login()?; }