Skip to content

Commit a0039db

Browse files
willscottAdphi
authored andcommitted
Skip disk conversion when format is raw
This skips the `convert2Img` step in favor of moving the file when targetting a raw format.
1 parent dc430fe commit a0039db

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

builder.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,9 @@ func (b *builder) installBootloader(ctx context.Context) error {
469469

470470
func (b *builder) convert2Img(ctx context.Context) error {
471471
logrus.Infof("converting to %s", b.format)
472+
if b.format == "raw" {
473+
return MoveFile(b.diskRaw, b.diskOut)
474+
}
472475
return exec.Run(ctx, "qemu-img", "convert", b.diskRaw, "-O", b.format, b.diskOut)
473476
}
474477

0 commit comments

Comments
 (0)