File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,14 @@ export class Downloader {
5050 }
5151
5252 private async getDownloadUrl ( version : string , os : string ) : Promise < string > {
53- const filename : string = `trivy_${ version } _${ os } -64bit.tar.gz`
5453 let response : Octokit . Response < ReposGetLatestReleaseResponse >
5554
5655 try {
5756 if ( version === 'latest' ) {
5857 response = await this . githubClient . repos . getLatestRelease ( {
5958 ...Downloader . trivyRepository
6059 } )
60+ version = response . data . tag_name . replace ( / v / , '' )
6161 } else {
6262 response = await this . githubClient . repos . getReleaseByTag ( {
6363 ...Downloader . trivyRepository ,
@@ -71,6 +71,8 @@ export class Downloader {
7171 ` )
7272 }
7373
74+ const filename : string = `trivy_${ version } _${ os } -64bit.tar.gz`
75+
7476 for await ( const asset of response . data . assets ) {
7577 if ( asset . name === filename ) {
7678 return asset . browser_download_url
You can’t perform that action at this time.
0 commit comments