ci: clean invalid global plugin path before deploy

This commit is contained in:
Haitao Pan 2026-06-06 06:39:10 +08:00
parent c6414d2a63
commit 28c19308c1

View File

@ -174,6 +174,12 @@ jobs:
install_plugin() {
if [ "${INSTALL_SOURCE}" = "github" ]; then
global_root="$(npm root -g)"
global_target="${global_root}/${PLUGIN_NAME}"
if [ -e "${global_target}" ] && [ ! -d "${global_target}" ]; then
echo "::remote-warning::Removing invalid global package path ${global_target}"
rm -f "${global_target}"
fi
npm install -g "${INSTALL_SPEC}"
elif command -v openclaw >/dev/null 2>&1; then
openclaw plugins install "${INSTALL_SPEC}" \