diff --git a/Cargo.lock b/Cargo.lock index caec085..020df47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "adana" -version = "0.13.30" +version = "0.13.31" dependencies = [ "anyhow", "bincode", diff --git a/Cargo.toml b/Cargo.toml index bf724a8..97aedac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "adana" -version = "0.13.30" +version = "0.13.31" edition = "2021" authors = ["Nordine Bittich"] license = "MIT" diff --git a/src/cache_command/process.rs b/src/cache_command/process.rs index 45d2333..1725037 100644 --- a/src/cache_command/process.rs +++ b/src/cache_command/process.rs @@ -252,7 +252,10 @@ pub fn process_command( } }; if path_buf.exists() { - *previous_dir = std::env::current_dir()?; + let current_dir = std::env::current_dir()?; + if current_dir != path_buf { + *previous_dir = current_dir; + } std::env::set_current_dir(path_buf.as_path())?; } else { return Err(anyhow::Error::msg(format!( diff --git a/static_binaries/adana-0.13.31 b/static_binaries/adana-0.13.31 new file mode 100755 index 0000000..9f79cb0 Binary files /dev/null and b/static_binaries/adana-0.13.31 differ