mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 16:44:23 +08:00
🎁 Sync 2026-04-03 23:44:19
This commit is contained in:
1 parent
c3c67665a1
commit
3b13fc3626
4 files changed
+42
-71
No files matched your search
@@ -205,19 +205,15 @@ fi
|
||||
# 问题: 旧版本写入的是 "openclaw-qqbot",但实际插件名是 "@tencent-connect/openclaw-qqbot"
|
||||
fix_plugin_config() {
|
||||
local qqbot_ext_dir="${OC_DATA}/.openclaw/extensions/openclaw-qqbot"
|
||||
local weixin_ext_dir="${OC_DATA}/.openclaw/extensions/openclaw-weixin"
|
||||
[ ! -d "$qqbot_ext_dir" ] && [ ! -d "$weixin_ext_dir" ] && return
|
||||
[ ! -d "$qqbot_ext_dir" ] && return
|
||||
[ ! -f "$CONFIG_FILE" ] && return
|
||||
|
||||
"$NODE_BIN" -e "
|
||||
const fs=require('fs');
|
||||
try{
|
||||
const d=JSON.parse(fs.readFileSync('${CONFIG_FILE}','utf8'));
|
||||
if(!d.plugins)d.plugins={};
|
||||
let modified=false;
|
||||
if(!d.plugins)d.plugins={};
|
||||
if(!Array.isArray(d.plugins.allow))d.plugins.allow=[];
|
||||
const hasWechat=fs.existsSync('${weixin_ext_dir}'); if(hasWechat && !d.plugins.allow.includes("@tencent-weixin/openclaw-weixin")) { d.plugins.allow.push("@tencent-weixin/openclaw-weixin"); modified=true; }
|
||||
|
||||
|
||||
// 修复 plugins.allow 数组中的插件名称
|
||||
if(Array.isArray(d.plugins.allow)){
|
||||
|
||||
Reference in new issue
Block a user