Skip to content

Commit

Permalink
Make missing limactl a critical error
Browse files Browse the repository at this point in the history
For now, maybe offer hints on how to install ?

Presumably user is able to find `brew install`
  • Loading branch information
afbjorklund committed Jan 31, 2022
1 parent c5b3094 commit b9e81c0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#ifndef QT_NO_SYSTEMTRAYICON

#include <QMessageBox>
#include <QStandardPaths>
#include "window.h"

int main(int argc, char *argv[])
Expand All @@ -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;
Expand Down

0 comments on commit b9e81c0

Please sign in to comment.