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:
@@ -99,7 +99,7 @@ Colors indicate status:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Render ASCII graph
|
// Render ASCII graph
|
||||||
renderGraph(layout, nil)
|
renderGraph(layout, subgraph)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,8 +73,12 @@ function downloadFile(url, dest) {
|
|||||||
response.pipe(file);
|
response.pipe(file);
|
||||||
|
|
||||||
file.on('finish', () => {
|
file.on('finish', () => {
|
||||||
file.close();
|
// Wait for file.close() to complete before resolving
|
||||||
resolve();
|
// 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