Dashboard › cli › streamDecompressToFile ETXTBSY
01a0857b-5f1d-7e43-ba50-ec3c537205e2| Project | Hits | Last recalled |
|---|---|---|
| opencode-lore | 1 | 11h ago |
Trap: createWriteStream().end() looks sufficient before spawning a downloaded binary because its callback follows finish, but finish does not guarantee the file descriptor is closed and Linux can raise ETXTBSY. Fix: streamDecompressToFile() uses openSync/short-write-safe writeSync/closeSync, preserving the first write or stream error over close failure. Synchronous close makes compressed downloads race-free before execution.