Pi adapter fetch crashes when Pi not installed #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-1-pi-adapter-null-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #1
When
zen_pi_enabledis true but Pi is not installed,_piAdapter.fetch()callswalk(null)which throws synchronously because_sessionsPathis null. The callback never fires, the pending counter never decrements, and OpenCode data is blocked from rendering.Fix: Added early return guard —
if (!_sessionsPath) { callback(null); return; }When zen_pi_enabled is true but Pi is not installed, _piAdapter.fetch() calls walk(null) which throws synchronously because _sessionsPath is null. The callback never fires, the pending counter never decrements, and OpenCode data is blocked from rendering. Add early return: if (!_sessionsPath) { callback(null); return; } Closes #1