diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 078bb800..4a2546d7 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -1105,7 +1105,12 @@ fn change_current_directory( None => Cow::Owned(home_dir()?), }; - cx.editor.set_cwd(&dir)?; + cx.editor.set_cwd(&dir).map_err(|err| { + anyhow!( + "Could not change working directory to '{}': {err}", + dir.display() + ) + })?; cx.editor.set_status(format!( "Current working directory is now {}",