mirror of
https://github.com/smittix/intercept.git
synced 2026-07-05 16:18:12 -07:00
fix: radiosonde config path and dependency detection
- Pass config file path (not directory) to auto_rx -c flag - Use absolute paths in generated station.cfg since auto_rx runs with cwd set to its install directory - Teach dependency checker about auto_rx.py at /opt install path so the "missing dependency" banner no longer appears Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,14 @@ logger = logging.getLogger('intercept.dependencies')
|
||||
# Additional paths to search for tools (e.g., /usr/sbin on Debian)
|
||||
EXTRA_TOOL_PATHS = ['/usr/sbin', '/sbin']
|
||||
|
||||
# Tools installed to non-standard locations (not on PATH)
|
||||
KNOWN_TOOL_PATHS: dict[str, list[str]] = {
|
||||
'auto_rx.py': [
|
||||
'/opt/radiosonde_auto_rx/auto_rx/auto_rx.py',
|
||||
'/opt/auto_rx/auto_rx.py',
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
def check_tool(name: str) -> bool:
|
||||
"""Check if a tool is installed."""
|
||||
@@ -51,6 +59,11 @@ def get_tool_path(name: str) -> str | None:
|
||||
if os.path.isfile(full_path) and os.access(full_path, os.X_OK):
|
||||
return full_path
|
||||
|
||||
# Check known non-standard install locations
|
||||
for known_path in KNOWN_TOOL_PATHS.get(name, []):
|
||||
if os.path.isfile(known_path):
|
||||
return known_path
|
||||
|
||||
return None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user