Skip to content

Commit

Permalink
fix: handle multiple colon
Browse files Browse the repository at this point in the history
  • Loading branch information
musdotdigital committed Nov 29, 2023
1 parent 5cdfce0 commit be7ace4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export class DebImage extends Image {
let updated_version = undefined
for (const info of response.raw.split('\n')) {
if (info.includes('Candidate')) {
updated_version = info.split(':')[1].trim()
// must handle case of multiple : in the line i.e. Candidate: 1:8.9p1-3ubuntu0.4
updated_version = info.split(':').slice(1).join(':').trim()
break
}
}
Expand Down

0 comments on commit be7ace4

Please sign in to comment.