fix(shell): check kv in update_install_option (#14564)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2026-03-26 12:08:29 +08:00
committed by GitHub
parent aab34b2338
commit 285e29d2dc

View File

@@ -2029,6 +2029,9 @@ pub fn update_install_option(k: &str, v: &str) -> ResultType<()> {
if !is_installed() || !crate::is_server() {
return Ok(());
}
if ![REG_NAME_INSTALL_PRINTER].contains(&k) || !["0", "1"].contains(&v) {
return Ok(());
}
let app_name = crate::get_app_name();
let ext = app_name.to_lowercase();
let cmds =