Skip to content

Commit

Permalink
fix: use temp folder instead
Browse files Browse the repository at this point in the history
  • Loading branch information
tdejager committed Aug 6, 2024
1 parent f199d27 commit c54978f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/pixi-build-python/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use rattler_conda_types::{
};
use rattler_package_streaming::write::CompressionLevel;
use reqwest::{Client, Url};
use tempfile::tempdir;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};

#[allow(missing_docs)]
Expand Down Expand Up @@ -141,16 +142,16 @@ async fn actual_main() -> miette::Result<()> {
let noarch_type = NoArchType::python();

// TODO: Setup defaults
let output_dir = std::env::current_dir()
.expect("failed to get current directory")
.join("pixi-build-python-output");
let output_dir = tempdir()
.into_diagnostic()
.context("failed to create temporary directory")?;
std::fs::create_dir_all(&output_dir)
.into_diagnostic()
.context("failed to create output directory")?;
let directories = Directories::setup(
name.as_normalized(),
args.manifest_path.as_path(),
&output_dir,
output_dir.path(),
false,
&Utc::now(),
)
Expand Down

0 comments on commit c54978f

Please sign in to comment.