Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(action): Support BusyBox version of wget #772

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
<!-- next-header -->
## [Unreleased] - ReleaseDate

### Fixes

- *(action)* Support BusyBox version of wget (broken in v1.14.9)

## [1.15.7] - 2023-06-26

### Fixes
Expand Down
9 changes: 8 additions & 1 deletion action/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down