mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:10:45 +00:00
fix(update): ignore plugin install stages in dist verify
This commit is contained in:
@@ -187,8 +187,8 @@ function assertSafeInstalledDistPath(relativePath, params) {
|
||||
return candidatePath;
|
||||
}
|
||||
|
||||
function isStagedRuntimeNodeModulesPath(relativePath) {
|
||||
return /^dist\/extensions\/[^/]+\/node_modules(?:\/|$)/u.test(
|
||||
function isStagedRuntimeDependencyPath(relativePath) {
|
||||
return /^dist\/extensions\/[^/]+\/(?:node_modules|\.openclaw-install-stage(?:-[^/]+)?)(?:\/|$)/u.test(
|
||||
normalizeRelativePath(relativePath),
|
||||
);
|
||||
}
|
||||
@@ -208,7 +208,7 @@ function listInstalledDistFiles(params = {}) {
|
||||
continue;
|
||||
}
|
||||
const relativeCurrentDir = normalizeRelativePath(relative(packageRoot, currentDir));
|
||||
if (isStagedRuntimeNodeModulesPath(relativeCurrentDir)) {
|
||||
if (isStagedRuntimeDependencyPath(relativeCurrentDir)) {
|
||||
continue;
|
||||
}
|
||||
for (const entry of readDir(currentDir, { withFileTypes: true })) {
|
||||
@@ -247,7 +247,7 @@ function pruneEmptyDistDirectories(params = {}) {
|
||||
|
||||
function prune(currentDir) {
|
||||
const relativeCurrentDir = normalizeRelativePath(relative(packageRoot, currentDir));
|
||||
if (isStagedRuntimeNodeModulesPath(relativeCurrentDir)) {
|
||||
if (isStagedRuntimeDependencyPath(relativeCurrentDir)) {
|
||||
return;
|
||||
}
|
||||
for (const entry of readDir(currentDir, { withFileTypes: true })) {
|
||||
|
||||
Reference in New Issue
Block a user