mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:17:34 +00:00
Userland: Fail Core::find_executable_in_path on empty inputs
Before this patch, `which ""` or `type ""` would say that the empty string is `/usr/local/bin/`. Convert callers to consistently call is_empty() on the returned string while we're at it, to support eventually removing the is_null() String state in the future.
This commit is contained in:
parent
7f9bd34d07
commit
170a7e263c
3 changed files with 5 additions and 2 deletions
|
@ -21,7 +21,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.parse(arguments);
|
||||
|
||||
auto fullpath = Core::find_executable_in_path(filename);
|
||||
if (fullpath.is_null()) {
|
||||
if (fullpath.is_empty()) {
|
||||
warnln("no '{}' in path", filename);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue