From b9e81c0fe4c72daeaadce40d67f1bf11c5aa6346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Mon, 31 Jan 2022 19:13:52 +0100 Subject: [PATCH] Make missing limactl a critical error For now, maybe offer hints on how to install ? Presumably user is able to find `brew install` --- main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.cpp b/main.cpp index 5cd4f5e..8a806a0 100644 --- a/main.cpp +++ b/main.cpp @@ -53,6 +53,7 @@ #ifndef QT_NO_SYSTEMTRAYICON #include +#include #include "window.h" int main(int argc, char *argv[]) @@ -71,6 +72,13 @@ int main(int argc, char *argv[]) "on this system.")); return 1; } + QString program = QStandardPaths::findExecutable("limactl"); + if (program.isEmpty()) { + QMessageBox::critical(0, QObject::tr("Lima"), + QObject::tr("I couldn't find limactl in PATH " + "on this system.")); + return 1; + } QApplication::setQuitOnLastWindowClosed(false); Window window;