fix(mvn): handle directories in `<relativePath>` (#12957)
Diff
1diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh
2index a569a87fad7ee1f21c04613131b5f64b28bd7111..7bffce36edc8e1454b8b15868001d60b32f86e0d 100644
3--- a/plugins/mvn/mvn.plugin.zsh
4+++ b/plugins/mvn/mvn.plugin.zsh
5@@ -101,8 +101,14 @@ function listMavenCompletions {
6 new_file="../pom.xml"
7 fi
8 9- # if file doesn't exist break
10 file="${file:h}/${new_file}"
11+
12+ # if the file points to a directory, assume it is a pom.xml in that directory
13+ if [[ -d "$file" ]]; then
14+ file="${file}/pom.xml"
15+ fi
16+
17+ # if file doesn't exist break
18 if ! [[ -e "$file" ]]; then
19 break
20 fi