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:41 UTC

[maven] branch MNG-6929 created (now 00021e9)

This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a change to branch MNG-6929
in repository https://gitbox.apache.org/repos/asf/maven.git.


      at 00021e9  Do not create empty file on error

This branch includes the following new commits:

     new 00021e9  Do not create empty file on error

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven] 01/01: Do not create empty file on error

Posted by rf...@apache.org.
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