mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
Support explicit tool path overrides via INTERCEPT_*_PATH
This commit is contained in:
@@ -20,6 +20,12 @@ def check_tool(name: str) -> bool:
|
||||
|
||||
def get_tool_path(name: str) -> str | None:
|
||||
"""Get the full path to a tool, checking standard PATH and extra locations."""
|
||||
# Optional explicit override, e.g. INTERCEPT_RTL_FM_PATH=/opt/homebrew/bin/rtl_fm
|
||||
env_key = f"INTERCEPT_{name.upper().replace('-', '_')}_PATH"
|
||||
env_path = os.environ.get(env_key)
|
||||
if env_path and os.path.isfile(env_path) and os.access(env_path, os.X_OK):
|
||||
return env_path
|
||||
|
||||
# Prefer native Homebrew binaries on Apple Silicon to avoid mixing Rosetta
|
||||
# /usr/local tools with arm64 Python/runtime.
|
||||
if platform.system() == 'Darwin':
|
||||
|
||||
Reference in New Issue
Block a user