Skip to content

Commit

Permalink
Fix multiple verbs getting latest github release
Browse files Browse the repository at this point in the history
With multiple verbs on the command line that retrieve the latest github
release, the version from the first verb would be used for the second
verb.

Delete the temporary version information file before fetching it to
avoid using the previous contents.
  • Loading branch information
arbruijn authored and austin987 committed Sep 21, 2024
1 parent 9f0d529 commit 53361a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/winetricks
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,9 @@ w_get_github_latest_release()
org="$1"
repo="$2"

# release.json might still exists from the previous verb
w_try rm -f "${W_TMP_EARLY}/release.json"

WINETRICKS_SUPER_QUIET=1 w_download_to "${W_TMP_EARLY}" "https://api.github.com/repos/${org}/${repo}/releases/latest" "" "release.json" >/dev/null 2>&1

# aria2c condenses the json (https://github.com/aria2/aria2/issues/1389)
Expand Down

0 comments on commit 53361a0

Please sign in to comment.