Skip to content

Commit

Permalink
main/xdeb: Fix receiving the 'latest' version of xdeb
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Reichl <[email protected]>
  • Loading branch information
thetredev committed Oct 6, 2023
1 parent 2f773ad commit 8f23db8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,12 @@ func prepare(context *cli.Context) error {
return fmt.Errorf("could not follow URL '%s'", urlPrefix)
}

// install latest release tag
urlPrefix = resp.Request.URL.String()
} else {
urlPrefix = fmt.Sprintf("%s/download/%s", xdeb.XDEB_URL, version)
// get latest release version
releaseUrl := resp.Request.URL.String()
version = releaseUrl[strings.LastIndex(releaseUrl, "/")+1:]
}

urlPrefix = fmt.Sprintf("%s/download/%s", xdeb.XDEB_URL, version)
}

url := fmt.Sprintf("%s/xdeb", urlPrefix)
Expand Down

0 comments on commit 8f23db8

Please sign in to comment.