Clarify that sbin directories are always looked at in get_bin_path (#78171)

pull/78181/head
Jan Christian Grünhage 4 years ago committed by GitHub
parent 1a417e52d6
commit b56d73796e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,6 +16,8 @@ def get_bin_path(arg, opt_dirs=None, required=None):
- required: [Deprecated] Prior to 2.10, if executable is not found and required is true it raises an Exception.
In 2.10 and later, an Exception is always raised. This parameter will be removed in 2.14.
- opt_dirs: optional list of directories to search in addition to PATH
In addition to PATH and opt_dirs, this function also looks through /sbin, /usr/sbin and /usr/local/sbin. A lot of
modules, especially for gathering facts, depend on this behaviour.
If found return full path, otherwise raise ValueError.
'''
opt_dirs = [] if opt_dirs is None else opt_dirs

Loading…
Cancel
Save