diff --git a/app/lima/lima.go b/app/lima/lima.go index 02efa26..438b739 100644 --- a/app/lima/lima.go +++ b/app/lima/lima.go @@ -219,6 +219,10 @@ func (vm LimaVM) GetVMDir() string { func (vm LimaVM) GetIPAddress() string { + if vm.Status != "Running" { + return "" + } + command := "ip -j addr show dev lima0" cmd := exec.Command("/bin/sh", "-c", fmt.Sprintf("limactl shell %s %s", vm.Name, command))