Files
podman/cmd/podman/compose_machine_windows.go
Arthur Sengileyev ededb4c3c4 Improve platform specific URL handling in podman compose for machines
Use filepath utility instead of generic string replace to convert path
on Windows. This also separates OS specific implementations to separate
compilation sources and removes redundant check for virtualization
provider on Windows platform.

Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2024-12-02 20:46:51 +02:00

16 lines
354 B
Go

package main
import (
"errors"
"path/filepath"
"github.com/containers/podman/v5/pkg/machine/define"
)
func extractConnectionString(podmanSocket *define.VMFile, podmanPipe *define.VMFile) (string, error) {
if podmanPipe == nil {
return "", errors.New("pipe of machine is not set")
}
return "npipe://" + filepath.ToSlash(podmanPipe.Path), nil
}