Explorar o código

UserspaceEmulator: Improve error message for typos

Ben Wiederhake %!s(int64=4) %!d(string=hai) anos
pai
achega
9058a8367f
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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);
 
     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;
     for (auto arg : command) {