re: #31375 (review)
(note: renamed search_system_path
to fallback_os_search
in the latest push)
I don’t get it why search_system_path
is used as allow_notfound
. Those are two different things.
Exactly, they are two different things.
If search_system_path
is true, then we want to allow the operating system to search the system path. In order for that to happen we need our own searches to not throw a fatal error, therefore allow_notfound
should also be true.
If search_system_path
is false, then do not want to allow the operating system to search the system path, and we want our own searches to throw a fatal error if they fail, so allow_notfound
should be false.
So search_system_path
and allow_notfound
are two different variables in two different functions with two different meanings. Just because one value is used to initialize the other one (once) doesn’t mean they should have the same name.