Commit 21c0391e authored by Taylor Thomas's avatar Taylor Thomas Committed by GitHub

Merge pull request #2803 from hobti01/patch-2

Fix curl error Failed writing body
parents a736c2a3 b914958b
...@@ -78,9 +78,9 @@ checkDesiredVersion() { ...@@ -78,9 +78,9 @@ checkDesiredVersion() {
# Use the GitHub releases webpage for the project to find the desired version for this project. # Use the GitHub releases webpage for the project to find the desired version for this project.
local release_url="https://github.com/kubernetes/helm/releases/${DESIRED_VERSION:-latest}" local release_url="https://github.com/kubernetes/helm/releases/${DESIRED_VERSION:-latest}"
if type "curl" > /dev/null; then if type "curl" > /dev/null; then
TAG=$(curl -SsL $release_url | awk '/\/tag\//' | head -n 1 | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}') TAG=$(curl -SsL $release_url | awk '/\/tag\//' | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}' | awk 'a !~ $0{print}; {a=$0}')
elif type "wget" > /dev/null; then elif type "wget" > /dev/null; then
TAG=$(wget -q -O - $release_url | awk '/\/tag\//' | head -n 1 | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}') TAG=$(wget -q -O - $release_url | awk '/\/tag\//' | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}' | awk 'a !~ $0{print}; {a=$0}')
fi fi
if [ "x$TAG" == "x" ]; then if [ "x$TAG" == "x" ]; then
echo "Cannot determine ${DESIRED_VERSION} tag." echo "Cannot determine ${DESIRED_VERSION} tag."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment