Skip to content

Commit f228305

Browse files
committed
Add LIMA_HOME to limactl info
This is useful because the directory will have all symlinks resolved, so can be used to determine the path to a relative hostSocket. Signed-off-by: Jan Dubois <[email protected]>
1 parent 3dccb98 commit f228305

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/limactl/info.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66

77
"github.com/lima-vm/lima/pkg/limayaml"
8+
"github.com/lima-vm/lima/pkg/store/dirnames"
89
"github.com/lima-vm/lima/pkg/version"
910
"github.com/spf13/cobra"
1011
)
@@ -22,6 +23,7 @@ func newInfoCommand() *cobra.Command {
2223
type Info struct {
2324
Version string `json:"version"`
2425
DefaultTemplate *limayaml.LimaYAML `json:"defaultTemplate"`
26+
LimaHome string `json:"limaHome"`
2527
// TODO: add diagnostic info of QEMU
2628
}
2729

@@ -34,6 +36,10 @@ func infoAction(cmd *cobra.Command, args []string) error {
3436
Version: version.Version,
3537
DefaultTemplate: y,
3638
}
39+
info.LimaHome, err = dirnames.LimaDir()
40+
if err != nil {
41+
return err
42+
}
3743
j, err := json.MarshalIndent(info, "", " ")
3844
if err != nil {
3945
return err

0 commit comments

Comments
 (0)