From 286c4f8403901beb7c7aac3ff12b396791207e14 Mon Sep 17 00:00:00 2001 From: Andi Radulescu Date: Fri, 27 Feb 2026 07:24:51 +0200 Subject: [PATCH] op.sh: fallback to script's own location for openpilot root (#37326) op: fallback to script's own location for openpilot root --- tools/op.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/op.sh b/tools/op.sh index 9f3d4ee13..2d833d689 100755 --- a/tools/op.sh +++ b/tools/op.sh @@ -77,7 +77,8 @@ function op_get_openpilot_dir() { done # Fallback to hardcoded directories if not found - for dir in "$HOME/openpilot" "/data/openpilot"; do + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" + for dir in "${SCRIPT_DIR%/tools}" "$HOME/openpilot" "/data/openpilot"; do if [[ -f "$dir/launch_openpilot.sh" ]]; then OPENPILOT_ROOT="$dir" return 0