rust/rhg/src/commands/files.rs
changeset 46445 ca3f73cc3cf4
parent 46436 252d1bdba33d
child 46446 1dcd9c9975ed
--- 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");