Fix directory change lag (#672)

This commit is contained in:
JT
2022-01-05 16:50:27 +11:00
committed by GitHub
parent c158d29577
commit affb9696c7
5 changed files with 21 additions and 17 deletions

View File

@ -37,9 +37,8 @@ impl Command for Enter {
let cwd = current_dir(engine_state, stack)?;
if let Ok(s) = new_path.as_string() {
let path = nu_path::expand_path_with(s, &cwd);
if !path.exists() {
if let Ok(s) = new_path.as_path() {
if !s.exists() {
return Err(ShellError::DirectoryNotFound(new_path.span()?));
}
}