mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:40:44 +00:00
fix: run packed bundled postinstall in release check
(cherry picked from commit e57e54e591)
This commit is contained in:
@@ -807,6 +807,20 @@ export function runBundledPluginPostinstall(params = {}) {
|
||||
});
|
||||
}
|
||||
|
||||
if (import.meta.url === pathToFileURL(process.argv[1] ?? "").href) {
|
||||
export function isDirectPostinstallInvocation(params = {}) {
|
||||
const entryPath = params.entryPath ?? process.argv[1];
|
||||
if (!entryPath) {
|
||||
return false;
|
||||
}
|
||||
const modulePath = params.modulePath ?? fileURLToPath(import.meta.url);
|
||||
const resolveRealPath = params.realpathSync ?? realpathSync;
|
||||
try {
|
||||
return resolveRealPath(entryPath) === resolveRealPath(modulePath);
|
||||
} catch {
|
||||
return pathToFileURL(entryPath).href === pathToFileURL(modulePath).href;
|
||||
}
|
||||
}
|
||||
|
||||
if (isDirectPostinstallInvocation()) {
|
||||
runBundledPluginPostinstall();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user