fix(graph,npm): fix nil pointer crash and Windows installer lock

- graph.go: Pass subgraph to renderGraph() instead of nil (fixes #657)
  The nil subgraph was dereferenced in computeDependencyCounts()
  causing a panic when running `bd graph` on epics.

- postinstall.js: Wait for file.close() callback before resolving (fixes #652)
  On Windows, the file was still locked when extraction started
  because resolve() was called immediately after file.close()
  without waiting for the close to complete.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-19 22:51:06 -08:00
parent ad4e813e71
commit a539a5bbbb
2 changed files with 7 additions and 3 deletions

View File

@@ -73,8 +73,12 @@ function downloadFile(url, dest) {
response.pipe(file);
file.on('finish', () => {
file.close();
resolve();
// Wait for file.close() to complete before resolving
// This is critical on Windows where the file may still be locked
file.close((err) => {
if (err) reject(err);
else resolve();
});
});
});