Skip to content

Commit 34ea90f

Browse files
committed
Remove unused user parameter
Signed-off-by: German Maglione <[email protected]>
1 parent 5312ba9 commit 34ea90f

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

cmd/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func doRun(flags *cobra.Command, args []string) error {
6767
}
6868

6969
//podman machine connection
70-
machineInfo, err := utils.GetMachineInfo(user)
70+
machineInfo, err := utils.GetMachineInfo()
7171
if err != nil {
7272
return err
7373
}

pkg/utils/podman.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import (
77
"os/exec"
88
"strings"
99

10-
"github.com/containers/podman-bootc/pkg/user"
11-
1210
"github.com/containers/podman/v5/pkg/machine"
1311
"github.com/containers/podman/v5/pkg/machine/define"
1412
"github.com/containers/podman/v5/pkg/machine/env"
@@ -22,13 +20,13 @@ type MachineInfo struct {
2220
Rootful bool
2321
}
2422

25-
func GetMachineInfo(user user.User) (*MachineInfo, error) {
23+
func GetMachineInfo() (*MachineInfo, error) {
2624
minfo, err := getMachineInfo()
2725
if err != nil {
2826
var errIncompatibleMachineConfig *define.ErrIncompatibleMachineConfig
2927
var errVMDoesNotExist *define.ErrVMDoesNotExist
3028
if errors.As(err, &errIncompatibleMachineConfig) || errors.As(err, &errVMDoesNotExist) {
31-
minfo, err := getPv4MachineInfo(user)
29+
minfo, err := getPv4MachineInfo()
3230
if err != nil {
3331
return nil, err
3432
}
@@ -71,7 +69,7 @@ func getMachineInfo() (*MachineInfo, error) {
7169
}
7270

7371
// 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) {
7573
//check if a default podman machine exists
7674
listCmd := exec.Command("podman", "machine", "list", "--format", "json")
7775
var listCmdOutput strings.Builder

podman-bootc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func cleanup() {
2424
}
2525

2626
//podman machine connection
27-
machineInfo, err := utils.GetMachineInfo(user)
27+
machineInfo, err := utils.GetMachineInfo()
2828
if err != nil {
2929
logrus.Errorf("unable to get podman machine info: %s", err)
3030
os.Exit(1)

0 commit comments

Comments
 (0)