Skip to content

Commit

Permalink
set TOOL_TEST to test string
Browse files Browse the repository at this point in the history
  • Loading branch information
sarg3nt committed May 24, 2024
1 parent f4ff4d8 commit a59d3e1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail

GH_REPO="https://github.com/dbrgn/tealdeer"
TOOL_NAME="tldr"
TOOL_TEST="tldr"
TOOL_TEST="tldr --version"

fail() {
echo -e "asdf-$TOOL_NAME: $*"
Expand All @@ -13,7 +13,6 @@ fail() {

curl_opts=(-fsSL)

# NOTE: You might want to remove this if tealdeer is not hosted on GitHub releases.
if [ -n "${GITHUB_API_TOKEN:-}" ]; then
curl_opts=("${curl_opts[@]}" -H "Authorization: token $GITHUB_API_TOKEN")
fi
Expand Down Expand Up @@ -86,7 +85,7 @@ download_release() {
url="$GH_REPO/releases/download/v${version}/${downloadname}"

echo "* Downloading $downloadname release $version..."
# * Downloading asdf-tldr: Unknown or unsupported platform macos-arm64 detected. release 1.6.1...

curl "${curl_opts[@]}" -o "$filename" -C - "$url" || fail "Could not download $url"
chmod +x "$filename"
}
Expand Down

0 comments on commit a59d3e1

Please sign in to comment.