Skip to content

Commit 3e3114a

Browse files
fix(openclaw): dedupe postinstall rebuild block (SyntaxError: startMs… already declared) (#1388)
Remove duplicate const startMs/result and keep rebuild only inside the else branch when native bindings are missing. ## Description Please include a summary of the change, the problem it solves, the implementation approach, and relevant context. List any dependencies required for this change. Related Issue (Required): Fixes #issue_number ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Refactor (does not change functionality, e.g. code style improvements, linting) - [ ] Documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Unit Test - [ ] Test Script Or Test Steps (please provide) - [ ] Pipeline Automated API Test (please provide) ## Checklist - [ ] I have performed a self-review of my own code | 我已自行检查了自己的代码 - [ ] I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释 - [ ] I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常 - [ ] I have created related documentation issue/PR in [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) (if applicable) | 我已在 [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) 中创建了相关的文档 issue/PR(如果适用) - [ ] I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用) - [ ] I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人 ## Reviewer Checklist - [ ] closes #xxxx (Replace xxxx with the GitHub issue number) - [ ] Made sure Checks passed - [ ] Tests have been provided
2 parents b7e24c3 + c18a252 commit 3e3114a

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)