mirror of https://github.com/ohmyzsh/ohmyzsh.git
fix(mvn): handle directories in `<relativePath>` (#12957)
This commit is contained in:
parent
2b547d113b
commit
db32c6ccce
|
@ -101,8 +101,14 @@ function listMavenCompletions {
|
||||||
new_file="../pom.xml"
|
new_file="../pom.xml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if file doesn't exist break
|
|
||||||
file="${file:h}/${new_file}"
|
file="${file:h}/${new_file}"
|
||||||
|
|
||||||
|
# if the file points to a directory, assume it is a pom.xml in that directory
|
||||||
|
if [[ -d "$file" ]]; then
|
||||||
|
file="${file}/pom.xml"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if file doesn't exist break
|
||||||
if ! [[ -e "$file" ]]; then
|
if ! [[ -e "$file" ]]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue