diff --git a/src/runner.rs b/src/runner.rs index 177389f..4b80274 100644 --- a/src/runner.rs +++ b/src/runner.rs @@ -40,15 +40,14 @@ pub fn get_tty() -> Result { // returns physical path. As a workaround, this function tries to use `PWD` // environment variable that is configured by shell. fn get_current_dir() -> Result { - let cur = std::env::current_dir(); if let Ok(pwd) = std::env::var("PWD") { if pwd.is_empty() { - cur + std::env::current_dir() } else { Ok(PathBuf::from(pwd)) } } else { - cur + std::env::current_dir() } }