feat: Add sidecar mode as an alternative to service mode

- Auto-fallback to sidecar mode if service mode fails
This commit is contained in:
wonfen
2025-03-03 03:34:34 +08:00
parent fdcefe458e
commit 277390e597
3 changed files with 100 additions and 13 deletions

View File

@@ -77,14 +77,12 @@ pub async fn resolve_setup(app: &mut App) {
}
}
if !service_runing {
log::error!(target: "app", "service not runing. exit");
app.app_handle().exit(-2);
log::warn!(target: "app", "service not running, will fallback to user mode");
}
}
}
Err(e) => {
log::error!(target: "app", "{e:?}");
app.app_handle().exit(-1);
log::warn!(target: "app", "failed to install service: {e:?}, will fallback to user mode");
}
}
}