From 9b50d95386928dfc5283c6b7ec37a00cee37042d Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sat, 21 Nov 2026 00:22:24 +0100 Subject: [PATCH] Resolve adb path in restore script; trim header Co-Authored-By: Claude Opus 5.5 --- scripts/restore_exercise_state.py | 7 ++++++- .../workout_app/lib/services/storage_service.dart | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/restore_exercise_state.py b/scripts/restore_exercise_state.py index a12371d..d0e42ba 100755 --- a/scripts/restore_exercise_state.py +++ b/scripts/restore_exercise_state.py @@ -24,6 +24,7 @@ import datetime as dt import json import os from pathlib import Path +import shutil import subprocess import sys import tempfile @@ -60,8 +61,12 @@ def prepare_restore(export: dict[str, Any], now: dt.datetime) -> dict[str, Any]: def _adb(*args: str) -> subprocess.CompletedProcess[str]: serial = os.environ.get("ADB_SERIAL", "23181JEGR08034") + adb = shutil.which("adb") + if adb is None: + msg = "adb is not on PATH (sudo pacman -S android-tools)" + raise FileNotFoundError(msg) return subprocess.run( - ["adb", "-s", serial, *args], + [adb, "-s", serial, *args], check=True, capture_output=True, text=True, diff --git a/stronglift_replacement/workout_app/lib/services/storage_service.dart b/stronglift_replacement/workout_app/lib/services/storage_service.dart index a544fa2..d25968b 100644 --- a/stronglift_replacement/workout_app/lib/services/storage_service.dart +++ b/stronglift_replacement/workout_app/lib/services/storage_service.dart @@ -24,8 +24,7 @@ import 'package:workout_app/services/manual_workout_port.dart'; import 'package:workout_app/services/pace_target_store.dart'; import 'package:workout_app/services/progression_sync_service.dart'; -// Re-exported: ExerciseState was defined here until it moved to models/, and -// every caller still reaches it through this import. +// Re-exported: callers reach ExerciseState etc. through this import. export 'package:workout_app/models/exercise_state.dart'; export 'package:workout_app/models/manual_deload.dart'; export 'package:workout_app/models/progression.dart';