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:
@@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user