fix(mvn): Handle directories in <relativePath>

This commit is contained in:
Daniel Mensinger 2025-02-03 14:19:29 +01:00 committed by Daniel Mensinger
commit e653f64677
No known key found for this signature in database
GPG key ID: 04E0637694408DCD

View file

@ -101,8 +101,14 @@ function listMavenCompletions {
new_file="../pom.xml"
fi
# if file doesn't exist break
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
break
fi