summaryrefslogtreecommitdiff
path: root/plugins/mvn/mvn.plugin.zsh
diff options
context:
space:
mode:
authorPaul N. Baker <paul-nelson-baker@users.noreply.github.com>2018-10-24 09:41:05 -0600
committerMarc Cornellà <marc.cornella@live.com>2018-10-24 17:41:05 +0200
commit745b6550a6a8415e2c6df0006aad40549c3bc56a (patch)
tree46f01779f78b5d725f0b21c9d992488d201a7fc9 /plugins/mvn/mvn.plugin.zsh
parent1ee6f2614c4da7c00b3d1490e59120d3af462929 (diff)
downloadzsh-745b6550a6a8415e2c6df0006aad40549c3bc56a.tar.gz
zsh-745b6550a6a8415e2c6df0006aad40549c3bc56a.tar.bz2
zsh-745b6550a6a8415e2c6df0006aad40549c3bc56a.zip
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
Diffstat (limited to 'plugins/mvn/mvn.plugin.zsh')
-rw-r--r--plugins/mvn/mvn.plugin.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh
index 74583c6dc..f367fecce 100644
--- a/plugins/mvn/mvn.plugin.zsh
+++ b/plugins/mvn/mvn.plugin.zsh
@@ -20,9 +20,9 @@ BACKGROUND_CYAN=$(tput setab 6)
BACKGROUND_WHITE=$(tput setab 7)
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() {
- if [ -f ./mvnw ] ; then
+ if [ -x ./mvnw ] ; then
echo "executing mvnw instead of mvn"
./mvnw "$@";
else