From 58266dea6650dc65c6d171aea7d62a5f07ec3faa Mon Sep 17 00:00:00 2001 From: ssmithx Date: Mon, 29 Jun 2026 13:42:07 +0000 Subject: [PATCH] fix(openwrt): allow opkg-not-found error through RPC sanitizer "opkg not found at /usr/bin/opkg" was being swallowed by the error sanitizer and shown as generic "Operation failed". Also fix bare `opkg list-installed` call in get-status handler to use full path. Co-Authored-By: Claude Sonnet 4.6 --- core/archipelago/src/api/rpc/middleware.rs | 1 + core/archipelago/src/api/rpc/openwrt.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/archipelago/src/api/rpc/middleware.rs b/core/archipelago/src/api/rpc/middleware.rs index ac029f36..1a0234de 100644 --- a/core/archipelago/src/api/rpc/middleware.rs +++ b/core/archipelago/src/api/rpc/middleware.rs @@ -69,6 +69,7 @@ pub(super) fn sanitize_error_message(msg: &str) -> String { "No space left", "TollGate installation failed", "No pre-built TollGate", + "opkg not found", ]; for prefix in &user_facing_prefixes { if msg.starts_with(prefix) { diff --git a/core/archipelago/src/api/rpc/openwrt.rs b/core/archipelago/src/api/rpc/openwrt.rs index 6a9d47f8..03cbdd1a 100644 --- a/core/archipelago/src/api/rpc/openwrt.rs +++ b/core/archipelago/src/api/rpc/openwrt.rs @@ -92,7 +92,7 @@ impl RpcHandler { // TollGate let tollgate_installed = router - .run("opkg list-installed | grep -q '^tollgate-module-basic-go '") + .run("/usr/bin/opkg list-installed | grep -q '^tollgate-module-basic-go '") .map(|(_, code)| code == 0) .unwrap_or(false);