mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
Fix issue with homebrew-installed nc taking precedence in $PATH
This commit addresses a problem where the nc command installed via homebrew was being used preferentially over the intended version due to its higher precedence in the $PATH environment variable. Adjustments have been made to ensure the script selects the correct nc executable, avoiding conflicts and ensuring consistent behavior across different setups.
This commit is contained in:
parent
d17ca487a4
commit
89011fc3ae
1 changed files with 6 additions and 2 deletions
|
|
@ -21,8 +21,12 @@ if parsed.scheme not in proxy_protocols:
|
|||
raise TypeError('unsupported proxy protocol: "{}"'.format(parsed.scheme))
|
||||
|
||||
def make_argv():
|
||||
yield "nc"
|
||||
if sys.platform in {'linux', 'cygwin'}:
|
||||
if sys.platform == 'darwin':
|
||||
# 'nc' in $PATH may be installed by homebrew, if without path
|
||||
yield "/usr/bin/nc"
|
||||
else:
|
||||
yield "nc"
|
||||
if sys.platform in {'linux', 'cygwin', 'darwin'}:
|
||||
# caveats: the built-in netcat of most linux distributions and cygwin support proxy type
|
||||
# caveats: macOS built-in netcat command not supported proxy-type
|
||||
yield "-X" # --proxy-type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue