Kaydet (Commit) dc00f1eb authored tarafından Brian Curtin's avatar Brian Curtin

Fix #15148. Capitalize PATH, hopefully leading to less confusion

üst 2193536e
...@@ -972,7 +972,7 @@ def get_terminal_size(fallback=(80, 24)): ...@@ -972,7 +972,7 @@ def get_terminal_size(fallback=(80, 24)):
return os.terminal_size((columns, lines)) return os.terminal_size((columns, lines))
def which(cmd, mode=os.F_OK | os.X_OK, path=None): def which(cmd, mode=os.F_OK | os.X_OK, path=None):
"""Given a command, mode, and a path string, return the path which """Given a command, mode, and a PATH string, return the path which
conforms to the given mode on the PATH, or None if there is no such file. conforms to the given mode on the PATH, or None if there is no such file.
`mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result of `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result of
os.environ.get("PATH"), or can be overridden with a custom search path.""" os.environ.get("PATH"), or can be overridden with a custom search path."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment