




















@@ -269,17 +269,26 @@ plugin_deps_cleanup_plugins() {
269269printf '%s\n' "${OPENCLAW_UPGRADE_SURVIVOR_PLUGIN_DEPS_CLEANUP_PLUGINS:-discord telegram}"
270270}
271271272+plugin_deps_cleanup_plugin_dirs() {
273+local plugin="$1"
274+printf '%s\n' \
275+"$(package_root)/dist/extensions/$plugin" \
276+"$(package_root)/extensions/$plugin"
277+}
278+272279legacy_plugin_dependency_probe_paths() {
273280local plugin="$1"
274281local plugin_dir
275- plugin_dir="$(package_root)/dist/extensions/$plugin"
282+while IFS= read -r plugin_dir; do
283+printf '%s\n' \
284+"$plugin_dir/node_modules" \
285+"$plugin_dir/.openclaw-runtime-deps.json" \
286+"$plugin_dir/.openclaw-runtime-deps-stamp.json" \
287+"$plugin_dir/.openclaw-runtime-deps-copy-upgrade-survivor" \
288+"$plugin_dir/.openclaw-install-stage-upgrade-survivor" \
289+"$plugin_dir/.openclaw-pnpm-store"
290+done < <(plugin_deps_cleanup_plugin_dirs "$plugin")
276291printf '%s\n' \
277-"$plugin_dir/node_modules" \
278-"$plugin_dir/.openclaw-runtime-deps.json" \
279-"$plugin_dir/.openclaw-runtime-deps-stamp.json" \
280-"$plugin_dir/.openclaw-runtime-deps-copy-upgrade-survivor" \
281-"$plugin_dir/.openclaw-install-stage-upgrade-survivor" \
282-"$plugin_dir/.openclaw-pnpm-store" \
283292"$(package_root)/.local/bundled-plugin-runtime-deps/$plugin-upgrade-survivor" \
284293"$OPENCLAW_STATE_DIR/.local/bundled-plugin-runtime-deps/$plugin-upgrade-survivor" \
285294"$OPENCLAW_STATE_DIR/plugin-runtime-deps/$plugin-upgrade-survivor"
@@ -297,10 +306,15 @@ seed_legacy_plugin_dependency_debris() {
297306local plugin
298307for plugin in $(plugin_deps_cleanup_plugins); do
299308local plugin_dir
300- plugin_dir="$(package_root)/dist/extensions/$plugin"
301-if [ ! -d "$plugin_dir" ]; then
302-continue
303-fi
309+ plugin_dir=""
310+local candidate_dir
311+while IFS= read -r candidate_dir; do
312+if [ -d "$candidate_dir" ]; then
313+ plugin_dir="$candidate_dir"
314+break
315+fi
316+done < <(plugin_deps_cleanup_plugin_dirs "$plugin")
317+ [ -n "$plugin_dir" ] || continue
304318 found=1
305319 mkdir -p \
306320"$plugin_dir/node_modules/openclaw-upgrade-survivor-dep" \
@@ -330,6 +344,7 @@ seed_legacy_plugin_dependency_debris() {
330344if [ "$found" -ne 1 ]; then
331345echo "plugin-deps-cleanup scenario could not find a packaged Discord or Telegram plugin directory" >&2
332346 find "$(package_root)/dist" -maxdepth 3 -type d 2>/dev/null >&2 || true
347+ find "$(package_root)/extensions" -maxdepth 2 -type d 2>/dev/null >&2 || true
333348return 1
334349fi
335350}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。