fix(npm): Windows postinstall file locking issue (GH#670)

- Move write stream creation after redirect handling to avoid orphan
  streams that keep file handles open
- Add 100ms delay after file.close() on Windows to ensure handle release
- Fixes "The process cannot access the file" error during extraction

🤖 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-25 19:47:01 -08:00
parent bbe1980b6c
commit c64ad028b7
2 changed files with 29 additions and 10 deletions
+5
View File
@@ -83,6 +83,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Skips interactions.jsonl and molecules.jsonl in sync checks
- These files are runtime state, not sync targets
- **Windows npm postinstall file locking** (GH#670) - Windows install fix
- Fixed file handle not being released before extraction on Windows
- Moved write stream creation after redirect handling to avoid orphan streams
- Added delay after file close to ensure Windows releases file handle
- **FatalErrorRespectJSON** (bd-28sq) - Consistent error output
- All commands respect `--json` flag for error output
- Errors return proper JSON structure when flag is set