ImagePartitionAction: return specific error on failure

go-losetup v2 now returns a meaningful error. Add it to the returned
error message.
This commit is contained in:
Jakob Unterwurzacher
2024-12-02 11:35:00 +01:00
parent 0bc5983e8a
commit db6b23c20a

View File

@@ -471,7 +471,7 @@ func (i *ImagePartitionAction) PreNoMachine(context *debos.DebosContext) error {
}
if err != nil {
return fmt.Errorf("Failed to setup loop device")
return fmt.Errorf("Failed to setup loop device: %v", err)
}
context.Image = i.loopDev.Path()
i.usingLoop = true