diff --git a/CHANGELOG.md b/CHANGELOG.md index 997a28d..debda96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.2.4 + +- Improve error message when a working directory for `cmd!` does not exist. + ## 0.2.3 - Fix bug where `Cmd::run` would ignore specified stdin. diff --git a/Cargo.toml b/Cargo.toml index a2be347..e9140f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "xshell" description = "Utilities for quick shell scripting in Rust" categories = ["development-tools::build-utils", "filesystem"] -version = "0.2.3" # also update xshell-macros/Cargo.toml and CHANGELOG.md +version = "0.2.4" # also update xshell-macros/Cargo.toml and CHANGELOG.md license = "MIT OR Apache-2.0" repository = "https://github.com/matklad/xshell" authors = ["Aleksey Kladov "] @@ -14,7 +14,7 @@ exclude = [".github/", "bors.toml", "rustfmt.toml", "cbench", "mock_bin/"] [workspace] [dependencies] -xshell-macros = { version = "=0.2.3", path = "./xshell-macros" } +xshell-macros = { version = "=0.2.4", path = "./xshell-macros" } [dev-dependencies] anyhow = "1.0.56" diff --git a/tests/it/main.rs b/tests/it/main.rs index 81f341d..db8339a 100644 --- a/tests/it/main.rs +++ b/tests/it/main.rs @@ -466,6 +466,7 @@ fn nonexistent_current_directory() { let sh = setup(); sh.change_dir("nonexistent"); let err = cmd!(sh, "ls").run().unwrap_err(); + assert!(err.to_string().contains("nonexistent")); if cfg!(unix) { assert!(err.to_string().starts_with("failed to get current directory")); assert!(err.to_string().ends_with("No such file or directory (os error 2)")); diff --git a/xshell-macros/Cargo.toml b/xshell-macros/Cargo.toml index 820a3c3..edb0445 100644 --- a/xshell-macros/Cargo.toml +++ b/xshell-macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "xshell-macros" description = "Private implementation detail of xshell crate" -version = "0.2.3" +version = "0.2.4" license = "MIT OR Apache-2.0" repository = "https://github.com/matklad/xshell" authors = ["Aleksey Kladov "]