We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a59f9f commit 1fd93faCopy full SHA for 1fd93fa
src/command/current.rs
@@ -12,6 +12,10 @@ pub struct Current {}
12
impl JpreCommand for Current {
13
fn run(self, _context: Context) -> ESResult<(), JpreError> {
14
let path = get_context_path();
15
+ if !path.exists() {
16
+ println!("<unknown>");
17
+ return Ok(());
18
+ }
19
let link_target = std::fs::read_link(&path)
20
.change_context(JpreError::Unexpected)
21
.attach_printable_lazy(|| format!("Failed to read link target of {:?}", path))?;
0 commit comments