Browse Source

UserspaceEmulator: Improve error message for typos

Ben Wiederhake 4 years ago
parent
commit
9058a8367f
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Userland/DevTools/UserspaceEmulator/main.cpp

+ 4 - 0
Userland/DevTools/UserspaceEmulator/main.cpp

@@ -49,6 +49,10 @@ int main(int argc, char** argv, char** env)
     parser.parse(argc, argv);
     parser.parse(argc, argv);
 
 
     auto executable_path = Core::find_executable_in_path(command[0]);
     auto executable_path = Core::find_executable_in_path(command[0]);
+    if (executable_path.is_empty()) {
+        reportln("Cannot find executable for '{}'.", command[0]);
+        return 1;
+    }
 
 
     Vector<String> arguments;
     Vector<String> arguments;
     for (auto arg : command) {
     for (auto arg : command) {