about summary refs log tree commit diff
path: root/src/actions/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/mod.rs')
-rw-r--r--src/actions/mod.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/actions/mod.rs b/src/actions/mod.rs
index 588ce8f..86af955 100644
--- a/src/actions/mod.rs
+++ b/src/actions/mod.rs
@@ -4,6 +4,7 @@ mod update;
 
 use std::path::{Path, PathBuf};
 
+use anyhow::Result;
 pub use create::create;
 pub use shift::shift;
 pub use update::update;
@@ -19,12 +20,8 @@ impl ActionOptions {
         }
     }
 
-    pub fn from_pwd() -> Result<Self, ()> {
-        let current_path = std::env::current_dir();
-        if let Ok(repository_path) = current_path {
-            Ok(ActionOptions { repository_path })
-        } else {
-            Err(())
-        }
+    pub fn from_pwd() -> Result<Self> {
+        let repository_path = std::env::current_dir()?;
+        Ok(ActionOptions { repository_path })
     }
 }