You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the _discover_path function in realm.py does the following:
checks $PATH with which, return that if present
if not found on $PATH, check in the user-specified paths dict, and return that if present
if not found in the user-specified paths dict, return some default path (/usr/sbin/xyz or /usr/bin/xyz).
This means that system copies installed on $PATH would always be chosen over manually specified paths in the constructor. Instead, the logic should probably instead be:
check in the user-specified paths dict, and return that if present
if not found in the user-specified paths dict, check $PATH with which, return that if present
if not found on $PATH, return some default value
This way, if a user manually specifies a path for some binary, we use that even if there's a system copy installed on $PATH (note that the default value is necessary since /usr/sbin isn't generally on $PATH for non-root users)
The text was updated successfully, but these errors were encountered:
Currently, the
_discover_path
function inrealm.py
does the following:$PATH
withwhich
, return that if present$PATH
, check in the user-specified paths dict, and return that if present/usr/sbin/xyz
or/usr/bin/xyz
).This means that system copies installed on
$PATH
would always be chosen over manually specified paths in the constructor. Instead, the logic should probably instead be:$PATH
withwhich
, return that if present$PATH
, return some default valueThis way, if a user manually specifies a path for some binary, we use that even if there's a system copy installed on
$PATH
(note that the default value is necessary since/usr/sbin
isn't generally on$PATH
for non-root users)The text was updated successfully, but these errors were encountered: