diff --git a/src/command/current.rs b/src/command/current.rs index 51935c2..b51ffe0 100644 --- a/src/command/current.rs +++ b/src/command/current.rs @@ -12,6 +12,10 @@ pub struct Current {} impl JpreCommand for Current { fn run(self, _context: Context) -> ESResult<(), JpreError> { let path = get_context_path(); + if !path.exists() { + println!(""); + return Ok(()); + } let link_target = std::fs::read_link(&path) .change_context(JpreError::Unexpected) .attach_printable_lazy(|| format!("Failed to read link target of {:?}", path))?;