Skip to content

Commit

Permalink
fix: do not remove non-existing build dir (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv authored Feb 27, 2024
1 parent a20b905 commit eba9446
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["rust-tests"]

[package]
name = "rattler-build"
version = "0.12.0"
version = "0.12.1"
authors = ["Wolf Vollprecht <w.vollprecht@gmail.com>"]
homepage = "https://github.com/prefix-dev/rattler-build"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub async fn run_build(

drop(enter);

if !tool_configuration.no_clean {
if !tool_configuration.no_clean && directories.build_dir.exists() {
fs::remove_dir_all(&directories.build_dir).into_diagnostic()?;
}

Expand Down
2 changes: 1 addition & 1 deletion test/end-to-end/test_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def variant_hash(variant):


def test_pkg_hash(rattler_build: RattlerBuild, recipes: Path, tmp_path: Path):
rattler_build.build(recipes / "pkg_hash", tmp_path)
rattler_build.build(recipes / "pkg_hash", tmp_path, extra_args=["--no-test"])
pkg = get_package(tmp_path, "pkg_hash")
expected_hash = variant_hash({"target_platform": host_subdir()})
assert pkg.name.endswith(f"pkg_hash-1.0.0-{expected_hash}_my_pkg.tar.bz2")
Expand Down

0 comments on commit eba9446

Please sign in to comment.