Skip to content

Commit 2ec9320

Browse files
committed
fix running an existing VM
Need a length check to avoid an out-of-bounds error. Signed-off-by: Valentin Rothberg <[email protected]>
1 parent bab3e89 commit 2ec9320

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/bootc/bootc_disk.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,9 @@ func (p *BootcDisk) pullImage() error {
284284

285285
p.imageData = imageData
286286
p.ImageId = imageData.ID
287-
p.RepoTag = imageData.RepoTags[0]
287+
if len(imageData.RepoTags) > 0 {
288+
p.RepoTag = imageData.RepoTags[0]
289+
}
288290

289291
return nil
290292
}

0 commit comments

Comments
 (0)