1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:27:34 +00:00

LibFileSystem+Everything: Remove resolve_executable_from_environment

This commit is contained in:
Ben Wiederhake 2023-05-29 22:20:05 +02:00 committed by Jelle Raaijmakers
parent 26efdf9d4f
commit f20d04726a
12 changed files with 12 additions and 23 deletions

View file

@ -375,7 +375,7 @@ ErrorOr<int> Shell::builtin_type(Main::Arguments arguments)
}
// check if its an executable in PATH
auto fullpath = FileSystem::resolve_executable_from_environment(command);
auto fullpath = Core::System::resolve_executable_from_environment(command);
if (!fullpath.is_error()) {
printf("%s is %s\n", command.characters(), escape_token(fullpath.release_value()).characters());
continue;
@ -1252,7 +1252,7 @@ ErrorOr<int> Shell::builtin_kill(Main::Arguments arguments)
{
// Simply translate the arguments and pass them to `kill'
Vector<String> replaced_values;
auto kill_path_or_error = FileSystem::resolve_executable_from_environment("kill"sv);
auto kill_path_or_error = Core::System::resolve_executable_from_environment("kill"sv);
if (kill_path_or_error.is_error()) {
warnln("kill: `kill' not found in PATH");
return 126;

View file

@ -1422,7 +1422,7 @@ void Shell::cache_path()
cached_path.append({ RunnablePath::Kind::Alias, name });
}
// TODO: Can we make this rely on FileSystem::resolve_executable_from_environment()?
// TODO: Can we make this rely on Core::System::resolve_executable_from_environment()?
DeprecatedString path = getenv("PATH");
if (!path.is_empty()) {
auto directories = path.split(':');