Add sbin to default paths

This commit is contained in:
Kovid Goyal 2020-12-29 10:50:31 +05:30
parent a7e9030c12
commit 08fae7a0ac
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -85,7 +85,7 @@ def find_exe(name: str) -> Optional[str]:
from kitty.utils import system_paths_on_macos
paths = system_paths_on_macos()
else:
paths = ['/usr/local/bin', '/opt/bin', '/usr/bin', '/bin']
paths = ['/usr/local/bin', '/opt/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin']
path = os.pathsep.join(paths) + os.pathsep + os.defpath
ans = shutil.which(name, path=path)
return ans