mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 01:30:21 +00:00
fix: harden plugin and hook install paths
This commit is contained in:
@@ -189,7 +189,17 @@ export async function updateNpmInstalledPlugins(params: {
|
||||
continue;
|
||||
}
|
||||
|
||||
const installPath = record.installPath ?? resolvePluginInstallDir(pluginId);
|
||||
let installPath: string;
|
||||
try {
|
||||
installPath = record.installPath ?? resolvePluginInstallDir(pluginId);
|
||||
} catch (err) {
|
||||
outcomes.push({
|
||||
pluginId,
|
||||
status: "error",
|
||||
message: `Invalid install path for "${pluginId}": ${String(err)}`,
|
||||
});
|
||||
continue;
|
||||
}
|
||||
const currentVersion = await readInstalledPackageVersion(installPath);
|
||||
|
||||
if (params.dryRun) {
|
||||
|
||||
Reference in New Issue
Block a user