diff --git a/pkg/machine/os/ostree.go b/pkg/machine/os/ostree.go index e1108057db..3bf1d7a177 100644 --- a/pkg/machine/os/ostree.go +++ b/pkg/machine/os/ostree.go @@ -236,10 +236,11 @@ func parseApplyInput(arg string) (string, string, error) { } imagePath := imgRef.StringWithinTransport() - if transportName == ociTransport { + switch transportName { + case ociTransport: // oci:/tmp/oci-image imagePath, _, _ = strings.Cut(imagePath, ":") - } else if transportName == ociArchiveTransport { + case ociArchiveTransport: // oci-archive:/tmp/myimage.tar imagePath = strings.TrimSuffix(imagePath, ":") }