mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
mvn: run mvnw only if executable (#7326)
The problem that can occur is ocassionally mvnw will not be executable. This can happen if mvnw is included from an archetype, as unix permissions aren't preserved within the jar they're stored in. Only using mvnw if it exists AND is executable
This commit is contained in:
parent
1ee6f2614c
commit
745b6550a6
1 changed files with 2 additions and 2 deletions
|
@ -20,9 +20,9 @@ BACKGROUND_CYAN=$(tput setab 6)
|
||||||
BACKGROUND_WHITE=$(tput setab 7)
|
BACKGROUND_WHITE=$(tput setab 7)
|
||||||
RESET_FORMATTING=$(tput sgr0)
|
RESET_FORMATTING=$(tput sgr0)
|
||||||
|
|
||||||
# if found a ./mvnw file execute it otherwise execute orignal mvn
|
# if found an executable ./mvnw file execute it otherwise execute orignal mvn
|
||||||
mvn-or-mvnw() {
|
mvn-or-mvnw() {
|
||||||
if [ -f ./mvnw ] ; then
|
if [ -x ./mvnw ] ; then
|
||||||
echo "executing mvnw instead of mvn"
|
echo "executing mvnw instead of mvn"
|
||||||
./mvnw "$@";
|
./mvnw "$@";
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue