fix(openwrt): capture apk stderr and run apk update before apk add opkg

apk errors were being silently dropped (stdout only). Run apk update
first and fail with a clear "router may have no internet" message if
it fails, rather than a cryptic exit-1 from apk add.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 17:12:57 +00:00
co-authored by Claude Sonnet 4.6
parent 5d82e6ff8d
commit dd3a3dfbac
2 changed files with 12 additions and 1 deletions
@@ -70,6 +70,7 @@ pub(super) fn sanitize_error_message(msg: &str) -> String {
"TollGate installation failed",
"No pre-built TollGate",
"opkg not found",
"apk update failed",
];
for prefix in &user_facing_prefixes {
if msg.starts_with(prefix) {