diff --git a/crates/nu-command/src/filesystem/cd.rs b/crates/nu-command/src/filesystem/cd.rs index c0e7dc8741..1438f3cae1 100644 --- a/crates/nu-command/src/filesystem/cd.rs +++ b/crates/nu-command/src/filesystem/cd.rs @@ -135,7 +135,7 @@ impl Command for Cd { } // if canonicalize failed, let's check to see if it's abbreviated - Err(e1) => { + Err(_) => { if use_abbrev { match query(&path_no_whitespace, None, v.span) { Ok(path) => path, @@ -147,10 +147,7 @@ impl Command for Cd { } } } else { - return Err(ShellError::DirectoryNotFound( - v.span, - Some(format!("IO Error: {e1:?}")), - )); + return Err(ShellError::DirectoryNotFound(v.span, None)); } } };