--- a/rust/rhg/src/commands/files.rs Thu Jan 28 19:21:57 2021 +0100
+++ b/rust/rhg/src/commands/files.rs Thu Jan 28 19:13:55 2021 +0100
@@ -28,8 +28,7 @@
repo: &Repo,
files: impl IntoIterator<Item = &'a HgPath>,
) -> Result<(), CommandError> {
- let cwd = std::env::current_dir()
- .or_else(|e| Err(CommandError::CurrentDirNotFound(e)))?;
+ let cwd = hg::utils::current_dir()?;
let rooted_cwd = cwd
.strip_prefix(repo.working_directory_path())
.expect("cwd was already checked within the repository");