This is an automated email from the ASF dual-hosted git repository.
grv pushed a commit to branch release18.12
in repository
https://gitbox.apache.org/repos/asf/ofbiz-framework.gitThe following commit(s) were added to refs/heads/release18.12 by this push:
new 2f14eb6 Fixed: Discouraged use of variable to store command with paramaters because of wordsplitting issue and instead used complete command for wget .(OFBIZ-12066)
2f14eb6 is described below
commit 2f14eb647272158568897022d42e7ae048b38736
Author: Girish Vasmatkar <
[hidden email]>
AuthorDate: Mon Nov 30 16:37:47 2020 +0530
Fixed: Discouraged use of variable to store command with paramaters because of wordsplitting issue
and instead used complete command for wget .(OFBIZ-12066)
---
gradle/init-gradle-wrapper.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/gradle/init-gradle-wrapper.sh b/gradle/init-gradle-wrapper.sh
index 0ce141c..c8ac130 100755
--- a/gradle/init-gradle-wrapper.sh
+++ b/gradle/init-gradle-wrapper.sh
@@ -48,9 +48,7 @@ downloadFile() {
return 0;
fi
elif [ -n "$(whereIsBinary wget)" ]; then
- GET_CMD="wget -q -O $GRADLE_WRAPPER_OFBIZ_PATH/$1 --server-response $2/$1";
- GET_CMD="$GET_CMD"' 2>&1 > /dev/null | grep "HTTP/.* 200"';
- if [ -n "$($GET_CMD)" ]; then
+ if [[ `wget -q -S -O $GRADLE_WRAPPER_OFBIZ_PATH/$1 $2/$1 2>&1 > /dev/null | grep 'HTTP/1.1 200 OK'` ]]; then
return 0;
fi
fi