Files
2024-08-25 08:05:28 +01:00

24 lines
539 B
Go

package limautil
import (
"os"
"os/exec"
"github.com/abiosoft/colima/cli"
"github.com/abiosoft/colima/config"
)
// EnvLimaHome is the environment variable for the Lima directory.
const EnvLimaHome = "LIMA_HOME"
// LimactlCommand is the limactl command.
const LimactlCommand = "limactl"
// Limactl prepares a limactl command.
func Limactl(args ...string) *exec.Cmd {
cmd := cli.Command(LimactlCommand, args...)
cmd.Env = append(cmd.Env, os.Environ()...)
cmd.Env = append(cmd.Env, EnvLimaHome+"="+config.LimaDir())
return cmd
}