Skip to content

Commit

Permalink
use a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Nov 27, 2024
1 parent 42000e1 commit 551a8ac
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ use crate::{
BackendOverride,
};

const DEFAULT_BUILD_TOOL: &str = "pixi-build-rattler-build";

#[derive(Debug, Error, Diagnostic)]
pub enum FinishError {
#[error(transparent)]
Expand Down Expand Up @@ -138,8 +140,8 @@ impl ProtocolBuilder {
.ok_or(FinishError::NoBuildSection(manifest_path.clone()))?
} else {
ToolSpec::Isolated(
IsolatedToolSpec::from_specs(["pixi-build-rattler-build".parse().unwrap()])
.with_command("pixi-build-rattler-build"),
IsolatedToolSpec::from_specs([DEFAULT_BUILD_TOOL.parse().unwrap()])
.with_command(DEFAULT_BUILD_TOOL),
)
};

Expand All @@ -148,13 +150,6 @@ impl ProtocolBuilder {
.await
.map_err(FinishError::Tool)?;

if let Some(cache_dir) = self.cache_dir.as_ref() {
let _ = std::fs::create_dir_all(cache_dir).map_err(|e| {
tracing::warn!("Failed to create cache dir: {:?}", e);
e
});
}

Ok(JsonRPCBuildProtocol::setup(
self.source_dir,
self.recipe_dir.join("recipe.yaml"),
Expand Down

0 comments on commit 551a8ac

Please sign in to comment.