From 5a04e30197fa7caaeb7d8c1f13e2bd94f02f8552 Mon Sep 17 00:00:00 2001 From: Alexander Koz Date: Thu, 9 May 2024 15:48:07 +0400 Subject: [PATCH] Follow-up for #353 - fix another test, bump version --- Cargo.lock | 2 +- cargo/Cargo.toml | 2 +- cargo/src/cli/mod.rs | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cf5a5803..27069576 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -741,7 +741,7 @@ dependencies = [ [[package]] name = "cargo-playdate" -version = "0.4.10" +version = "0.4.11" dependencies = [ "anstyle", "anyhow", diff --git a/cargo/Cargo.toml b/cargo/Cargo.toml index 86c03881..e12ddf5b 100644 --- a/cargo/Cargo.toml +++ b/cargo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-playdate" -version = "0.4.10" +version = "0.4.11" readme = "README.md" description = "Build tool for neat yellow console." keywords = ["playdate", "build", "cargo", "plugin", "cargo-subcommand"] diff --git a/cargo/src/cli/mod.rs b/cargo/src/cli/mod.rs index c27859be..c53a2557 100644 --- a/cargo/src/cli/mod.rs +++ b/cargo/src/cli/mod.rs @@ -789,9 +789,12 @@ mod tests { #[test] fn init_standalone() -> CargoResult<()> { let mut cwd = std::env::current_dir()?; - if !cwd.ends_with("tests/crates/simple/no-cfg") { - // this check needed because tests can run in one process - cwd.push(PathBuf::from("tests/crates/simple/no-cfg")) + { + let crate_path = PathBuf::from("tests/crates/simple/no-cfg"); + if !cwd.ends_with(&crate_path) { + // this check needed because tests can run in one process + cwd.push(crate_path) + } } println!("PWD: {}", cwd.display()); std::env::set_current_dir(cwd)?;