mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-09 00:01:17 +00:00
fix: preserve linked install unsafe flag and baseline regressions
This commit is contained in:
@@ -567,11 +567,20 @@ function discoverInDirectory(params: {
|
||||
candidates: PluginCandidate[];
|
||||
diagnostics: PluginDiagnostic[];
|
||||
seen: Set<string>;
|
||||
recurseDirectories?: boolean;
|
||||
skipDirectories?: Set<string>;
|
||||
visitedDirectories?: Set<string>;
|
||||
}) {
|
||||
if (!fs.existsSync(params.dir)) {
|
||||
return;
|
||||
}
|
||||
const resolvedDir = safeRealpathSync(params.dir) ?? path.resolve(params.dir);
|
||||
if (params.recurseDirectories) {
|
||||
if (params.visitedDirectories?.has(resolvedDir)) {
|
||||
return;
|
||||
}
|
||||
params.visitedDirectories?.add(resolvedDir);
|
||||
}
|
||||
let entries: fs.Dirent[] = [];
|
||||
try {
|
||||
entries = fs.readdirSync(params.dir, { withFileTypes: true });
|
||||
@@ -695,6 +704,14 @@ function discoverInDirectory(params: {
|
||||
manifest,
|
||||
packageDir: fullPath,
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
if (params.recurseDirectories) {
|
||||
discoverInDirectory({
|
||||
...params,
|
||||
dir: fullPath,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -894,6 +911,18 @@ export function discoverOpenClawPlugins(params: {
|
||||
});
|
||||
}
|
||||
if (roots.workspace && workspaceRoot) {
|
||||
discoverInDirectory({
|
||||
dir: workspaceRoot,
|
||||
origin: "workspace",
|
||||
ownershipUid: params.ownershipUid,
|
||||
workspaceDir: workspaceRoot,
|
||||
candidates,
|
||||
diagnostics,
|
||||
seen,
|
||||
recurseDirectories: true,
|
||||
skipDirectories: new Set([".openclaw"]),
|
||||
visitedDirectories: new Set<string>(),
|
||||
});
|
||||
discoverInDirectory({
|
||||
dir: roots.workspace,
|
||||
origin: "workspace",
|
||||
|
||||
Reference in New Issue
Block a user