mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-11 18:10:41 +08:00
fix: npm install后误卸载新装包(current_source=unknown时old_pkg与new pkg相同)
This commit is contained in:
@@ -3627,7 +3627,7 @@ async fn upgrade_openclaw_inner(
|
||||
// 切换源时需要卸载旧包,但为避免安装失败导致 CLI 丢失,
|
||||
// 先安装新包,成功后再卸载旧包
|
||||
let old_pkg = npm_package_name(¤t_source);
|
||||
let need_uninstall_old = current_source != source;
|
||||
let need_uninstall_old = current_source != source && old_pkg != pkg_name;
|
||||
|
||||
if requested_version.is_none() {
|
||||
if let Some(recommended) = &recommended_version {
|
||||
|
||||
Reference in New Issue
Block a user