Skip to content

Commit db32c6c

Browse files
authored
fix(mvn): handle directories in <relativePath> (ohmyzsh#12957)
1 parent 2b547d1 commit db32c6c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plugins/mvn/mvn.plugin.zsh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,14 @@ function listMavenCompletions {
101101
new_file="../pom.xml"
102102
fi
103103

104-
# if file doesn't exist break
105104
file="${file:h}/${new_file}"
105+
106+
# if the file points to a directory, assume it is a pom.xml in that directory
107+
if [[ -d "$file" ]]; then
108+
file="${file}/pom.xml"
109+
fi
110+
111+
# if file doesn't exist break
106112
if ! [[ -e "$file" ]]; then
107113
break
108114
fi

0 commit comments

Comments
 (0)