浏览代码

UserspaceEmulator: Improve error message for typos

Ben Wiederhake 4 年之前
父节点
当前提交
9058a8367f
共有 1 个文件被更改,包括 4 次插入0 次删除
  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) {