Better ls paths (#4612)

* Fix ls paths... again

* Fix ls paths... again

* Always expand paths inside of glob_from

* Expand in ls before we check for directory info
This commit is contained in:
JT
2022-02-23 10:54:47 -05:00
committed by GitHub
parent f507613b38
commit 676457acd3
2 changed files with 11 additions and 14 deletions

View File

@ -25,11 +25,7 @@ pub fn glob_from(
ShellError,
> {
let path = PathBuf::from(&pattern.item);
let path = if path.is_relative() {
expand_path_with(path, cwd)
} else {
path
};
let path = expand_path_with(path, cwd);
let (prefix, pattern) = if path.to_string_lossy().contains('*') {
// Path is a glob pattern => do not check for existence