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 {
50
50
}
51
51
52
52
private async getDownloadUrl ( version : string , os : string ) : Promise < string > {
53
- const filename : string = `trivy_${ version } _${ os } -64bit.tar.gz`
54
53
let response : Octokit . Response < ReposGetLatestReleaseResponse >
55
54
56
55
try {
57
56
if ( version === 'latest' ) {
58
57
response = await this . githubClient . repos . getLatestRelease ( {
59
58
...Downloader . trivyRepository
60
59
} )
60
+ version = response . data . tag_name . replace ( / v / , '' )
61
61
} else {
62
62
response = await this . githubClient . repos . getReleaseByTag ( {
63
63
...Downloader . trivyRepository ,
@@ -71,6 +71,8 @@ export class Downloader {
71
71
` )
72
72
}
73
73
74
+ const filename : string = `trivy_${ version } _${ os } -64bit.tar.gz`
75
+
74
76
for await ( const asset of response . data . assets ) {
75
77
if ( asset . name === filename ) {
76
78
return asset . browser_download_url
You can’t perform that action at this time.
0 commit comments