diff options
Diffstat (limited to '')
| -rw-r--r-- | src/command/history.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/command/history.rs b/src/command/history.rs index 37b4b9dd..b644b9ac 100644 --- a/src/command/history.rs +++ b/src/command/history.rs @@ -114,7 +114,12 @@ impl Cmd { return Ok(()); } - let cwd = env::current_dir()?.display().to_string(); + // It's better for atuin to silently fail here and attempt to + // store whatever is ran, than to throw an error to the terminal + let cwd = match env::current_dir() { + Ok(dir) => dir.display().to_string(), + Err(_) => String::from(""), + }; let h = History::new(chrono::Utc::now(), command, cwd, -1, -1, None, None); |
