Skip to content

Commit

Permalink
Merge pull request #19 from CorentinB/master
Browse files Browse the repository at this point in the history
Fix unknown option 'show-progress'
  • Loading branch information
kerolloz authored Aug 14, 2024
2 parents 895f3ce + 13e6b40 commit 6a4dc67
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ function install_go() {
tput smul
)$VERSION${RESET})..."

if ! wget --quiet --continue --show-progress "$latest_version_link"; then
# wget2 v2.1.0 changed --show-progress to --force-progress, so we need to check which one to use
progress_arg="--show-progress"
wget --help | grep -q -- --force-progress && progress_arg="--force-progress"

if ! wget --quiet --continue $progress_arg "$latest_version_link"; then
echo "$($TEXT_COLOR $RED)Download failed!"
exit 1
fi
Expand Down

0 comments on commit 6a4dc67

Please sign in to comment.