mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 00:51:25 +00:00
fix: harden plugin and hook install paths
This commit is contained in:
@@ -771,7 +771,13 @@ export function registerHooksCli(program: Command): void {
|
||||
continue;
|
||||
}
|
||||
|
||||
const installPath = record.installPath ?? resolveHookInstallDir(hookId);
|
||||
let installPath: string;
|
||||
try {
|
||||
installPath = record.installPath ?? resolveHookInstallDir(hookId);
|
||||
} catch (err) {
|
||||
defaultRuntime.log(theme.error(`Invalid install path for "${hookId}": ${String(err)}`));
|
||||
continue;
|
||||
}
|
||||
const currentVersion = await readInstalledPackageVersion(installPath);
|
||||
|
||||
if (opts.dryRun) {
|
||||
|
||||
Reference in New Issue
Block a user