diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ab3cab6d..6a7d5138b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - ReleaseDate +### Fixes + +- *(action)* Support BusyBox version of wget (broken in v1.14.9) + ## [1.15.7] - 2023-06-26 ### Fixes diff --git a/action/entrypoint.sh b/action/entrypoint.sh index 79aca6131..5985baf12 100755 --- a/action/entrypoint.sh +++ b/action/entrypoint.sh @@ -36,7 +36,14 @@ fi if [[ ! -x ${COMMAND} ]]; then VERSION=1.15.7 log "Downloading 'typos' v${VERSION}" - wget --progress=dot:mega "https://github.com/crate-ci/typos/releases/download/v${VERSION}/typos-v${VERSION}-x86_64-unknown-linux-musl.tar.gz" + + # The BusyBox version of wget doesn't support --progress, + # so we only set it, if we don't detect busybox. + if [ "$(readlink "$(which wget)")" != /bin/busybox ]; then + WGET_OPTS=--progress=dot:mega + fi + + wget $WGET_OPTS "https://github.com/crate-ci/typos/releases/download/v${VERSION}/typos-v${VERSION}-x86_64-unknown-linux-musl.tar.gz" mkdir -p ${_INSTALL_DIR} tar -xzvf typos-v${VERSION}-x86_64-unknown-linux-musl.tar.gz -C ${_INSTALL_DIR} ./${CMD_NAME} rm typos-v${VERSION}-x86_64-unknown-linux-musl.tar.gz