diff --git a/cargo-dist/src/build/fake.rs b/cargo-dist/src/build/fake.rs index 175c2c5bc..8c604e289 100644 --- a/cargo-dist/src/build/fake.rs +++ b/cargo-dist/src/build/fake.rs @@ -4,6 +4,7 @@ //! without needing to actually run platform-specific builds use axoasset::LocalAsset; +use camino::Utf8PathBuf; use cargo_dist_schema::DistManifest; use crate::{BinaryIdx, CargoBuildStep, DistGraph, DistResult, GenericBuildStep}; @@ -39,13 +40,9 @@ fn build_fake_binaries( binaries: &[BinaryIdx], ) -> DistResult<()> { // Shove these in a temp dir inside the dist dir, where it's safe for us to do whatever - let tempdir = dist.dist_dir.join("_fake_tmp"); - // Clear out old files (files we need get copied out by the time this function returns) - if tempdir.exists() { - LocalAsset::remove_dir_all(&tempdir)?; - } - LocalAsset::create_dir_all(&tempdir)?; - + let tmp = temp_dir::TempDir::new()?; + let tempdir = + Utf8PathBuf::from_path_buf(tmp.path().to_owned()).expect("temp_dir made non-utf8 path!?"); let mut expectations = BuildExpectations::new_fake(dist, binaries); for idx in binaries { diff --git a/cargo-dist/tests/snapshots/axolotlsay_basic_lies.snap b/cargo-dist/tests/snapshots/axolotlsay_basic_lies.snap index 89b4eb082..f8280f9e9 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_basic_lies.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_basic_lies.snap @@ -28,7 +28,7 @@ PRINT_VERBOSE=${INSTALLER_PRINT_VERBOSE:-0} PRINT_QUIET=${INSTALLER_PRINT_QUIET:-0} NO_MODIFY_PATH=${INSTALLER_NO_MODIFY_PATH:-0} read -r RECEIPT <> "$GITHUB_OUTPUT" - jq --raw-output ".artifacts[]?.path | select( . != null )" dist-manifest.json >> "$GITHUB_OUTPUT" + jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT" echo "EOF" >> "$GITHUB_OUTPUT" cp dist-manifest.json "$BUILD_MANIFEST_NAME" @@ -2634,7 +2642,7 @@ jobs: # Parse out what we just built and upload it to scratch storage echo "paths<> "$GITHUB_OUTPUT" - jq --raw-output ".artifacts[]?.path | select( . != null )" dist-manifest.json >> "$GITHUB_OUTPUT" + jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT" echo "EOF" >> "$GITHUB_OUTPUT" cp dist-manifest.json "$BUILD_MANIFEST_NAME"