Skip to content

Commit 0e391c5

Browse files
authored
Merge pull request #400 from rancher-sandbox/lima-home-info
Add LIMA_HOME to `limactl info`
2 parents 3dccb98 + f228305 commit 0e391c5

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)