Skip to content

Commit

Permalink
fix(mvn): handle directories in <relativePath> (ohmyzsh#12957)
Browse files Browse the repository at this point in the history
  • Loading branch information
mensinda authored Feb 4, 2025
1 parent 2b547d1 commit db32c6c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins/mvn/mvn.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db32c6c

Please sign in to comment.