You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2020/06/19 09:46:42 UTC
[maven] 01/01: Do not create empty file on error
This is an automated email from the ASF dual-hosted git repository.
rfscholte pushed a commit to branch MNG-6929
in repository https://gitbox.apache.org/repos/asf/maven.git
commit 00021e9103b723cc918b1db88533b65b90661b76
Author: Benjamin Marwell <bm...@apache.org>
AuthorDate: Mon Jun 1 22:02:13 2020 +0200
Do not create empty file on error
---
apache-maven/src/assembly/wrapper/script/download | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apache-maven/src/assembly/wrapper/script/download b/apache-maven/src/assembly/wrapper/script/download
index e2a011c..79cd110 100755
--- a/apache-maven/src/assembly/wrapper/script/download
+++ b/apache-maven/src/assembly/wrapper/script/download
@@ -30,9 +30,9 @@ else
echo "Found wget ... using wget"
fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
- wget "$jarUrl" -O "$wrapperJarPath"
+ wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
else
- wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
fi
elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then