7
7
"os/exec"
8
8
"strings"
9
9
10
- "github.com/containers/podman-bootc/pkg/user"
11
-
12
10
"github.com/containers/podman/v5/pkg/machine"
13
11
"github.com/containers/podman/v5/pkg/machine/define"
14
12
"github.com/containers/podman/v5/pkg/machine/env"
@@ -22,13 +20,13 @@ type MachineInfo struct {
22
20
Rootful bool
23
21
}
24
22
25
- func GetMachineInfo (user user. User ) (* MachineInfo , error ) {
23
+ func GetMachineInfo () (* MachineInfo , error ) {
26
24
minfo , err := getMachineInfo ()
27
25
if err != nil {
28
26
var errIncompatibleMachineConfig * define.ErrIncompatibleMachineConfig
29
27
var errVMDoesNotExist * define.ErrVMDoesNotExist
30
28
if errors .As (err , & errIncompatibleMachineConfig ) || errors .As (err , & errVMDoesNotExist ) {
31
- minfo , err := getPv4MachineInfo (user )
29
+ minfo , err := getPv4MachineInfo ()
32
30
if err != nil {
33
31
return nil , err
34
32
}
@@ -71,7 +69,7 @@ func getMachineInfo() (*MachineInfo, error) {
71
69
}
72
70
73
71
// Just to support podman v4.9, it will be removed in the future
74
- func getPv4MachineInfo (user user. User ) (* MachineInfo , error ) {
72
+ func getPv4MachineInfo () (* MachineInfo , error ) {
75
73
//check if a default podman machine exists
76
74
listCmd := exec .Command ("podman" , "machine" , "list" , "--format" , "json" )
77
75
var listCmdOutput strings.Builder
0 commit comments