summaryrefslogtreecommitdiff
path: root/Userland/DevTools/UserspaceEmulator/main.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-08-20 18:31:03 +0200
committerLinus Groh <mail@linusgroh.de>2022-08-23 19:00:04 +0100
commit5f99934dce1e00f5856bd40dca9d5e86e71d625e (patch)
treeaaec591e2fd977714fa200a184c8b5ec701c73e9 /Userland/DevTools/UserspaceEmulator/main.cpp
parent39a3775f4870fb16b49fec24aa5fd506b17a0ea9 (diff)
downloadserenity-5f99934dce1e00f5856bd40dca9d5e86e71d625e.zip
Userland: Consolidate most PATH resolving into a single implementation
We previously had at least three different implementations for resolving executables in the PATH, all of which had slightly different characteristics. Merge those into a single implementation to keep the behaviour consistent, and maybe to make that implementation more configurable in the future.
Diffstat (limited to 'Userland/DevTools/UserspaceEmulator/main.cpp')
-rw-r--r--Userland/DevTools/UserspaceEmulator/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/UserspaceEmulator/main.cpp b/Userland/DevTools/UserspaceEmulator/main.cpp
index b661b78ef8..f011b5442d 100644
--- a/Userland/DevTools/UserspaceEmulator/main.cpp
+++ b/Userland/DevTools/UserspaceEmulator/main.cpp
@@ -49,7 +49,7 @@ int main(int argc, char** argv, char** env)
if (arguments[0].contains("/"sv))
executable_path = Core::File::real_path_for(arguments[0]);
else
- executable_path = Core::find_executable_in_path(arguments[0]);
+ executable_path = Core::File::resolve_executable_from_environment(arguments[0]).value_or({});
if (executable_path.is_empty()) {
reportln("Cannot find executable for '{}'."sv, arguments[0]);
return 1;