mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:30:42 +00:00
fix: skip compile cache permission warnings (#76362) (thanks @neeravmakwana)
This commit is contained in:
@@ -814,6 +814,10 @@ function shouldRunBundledPluginPostinstall(params) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function isCompileCachePrunePermissionDenied(error) {
|
||||
return error?.code === "EACCES" || error?.code === "EPERM";
|
||||
}
|
||||
|
||||
export function pruneOpenClawCompileCache(params = {}) {
|
||||
const env = params.env ?? process.env;
|
||||
const pathExists = params.existsSync ?? existsSync;
|
||||
@@ -842,10 +846,16 @@ export function pruneOpenClawCompileCache(params = {}) {
|
||||
retryDelay: 100,
|
||||
});
|
||||
} catch (error) {
|
||||
if (isCompileCachePrunePermissionDenied(error)) {
|
||||
continue;
|
||||
}
|
||||
log.warn?.(`[postinstall] could not prune OpenClaw compile cache: ${String(error)}`);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
if (isCompileCachePrunePermissionDenied(error)) {
|
||||
continue;
|
||||
}
|
||||
log.warn?.(`[postinstall] could not prune OpenClaw compile cache: ${String(error)}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user