Skip to content

Commit

Permalink
unbreak download maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
booniepepper committed Oct 30, 2023
1 parent 067e80d commit f082a9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bin/download
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ source "${plugin_dir}/lib/utils.bash"

mkdir -p "$ASDF_DOWNLOAD_PATH"

release_file="$ASDF_DOWNLOAD_PATH/dt.tgz"

# Download tar.gz file to the download directory
download_release "$ASDF_INSTALL_VERSION"
download_release "$ASDF_INSTALL_VERSION" "$release_file"

# Extract contents of tar.gz file into the download directory
tar -xzf "$release_file" -C "$ASDF_DOWNLOAD_PATH" || fail "Could not extract $release_file"
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ host_zig_triple() {
download_release() {
local version filename url
version="$1"
filename="$2"

url="$GH_REPO/releases/download/v${version}/dt-$(host_zig_triple).tgz"
filename="$ASDF_DOWNLOAD_PATH/dt"

echo "* Downloading $TOOL_NAME release $version (to $filename)"
curl "${curl_opts[@]}" -o "$filename" -C - "$url" || fail "Could not download $url"
Expand Down

0 comments on commit f082a9b

Please sign in to comment.