Skip to content

Commit c18a252

Browse files
author
jiachengzhen
committed
fix(openclaw): dedupe postinstall rebuild block (SyntaxError: startMs already declared)
Remove duplicate const startMs/result and keep rebuild only inside the else branch when native bindings are missing. Made-with: Cursor
1 parent ceb3367 commit c18a252

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

apps/memos-local-openclaw/scripts/postinstall.cjs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -397,16 +397,6 @@ if (sqliteBindingsExist()) {
397397
warn("better-sqlite3 native bindings are missing or not loadable.");
398398
log(`Searched in: ${DIM}${sqliteModulePath}/build/${RESET}`);
399399
log("Running: npm rebuild better-sqlite3 (may take 30-60s)...");
400-
}
401-
402-
const startMs = Date.now();
403-
404-
const result = spawnSync(npmCmd, ["rebuild", "better-sqlite3"], {
405-
cwd: pluginDir,
406-
stdio: "pipe",
407-
shell: false,
408-
timeout: 180_000,
409-
});
410400

411401
const startMs = Date.now();
412402
const result = spawnSync(npmCmd, ["rebuild", "better-sqlite3"], {

0 commit comments

Comments
 (0)