[PR #662] [MERGED] feat: Replace unzip with @zip.js/zip.js for Windows compatibility #9675

Closed
opened 2026-02-16 18:13:58 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/662
Author: @ClayWarren
Created: 7/3/2025
Status: Merged
Merged: 7/24/2025
Merged by: @thdxr

Base: devHead: fix/windows-unzip-issue


📝 Commits (2)

  • e7387e5 feat: Replace unzip with @zip.js/zip.js for Windows compatibility
  • b38a79d Merge branch 'dev' into fix/windows-unzip-issue

📊 Changes

4 files changed (+119 additions, -59 deletions)

View changed files

📝 bun.lock (+4 -0)
📝 packages/opencode/package.json (+2 -0)
📝 packages/opencode/src/file/fzf.ts (+36 -14)
📝 packages/opencode/src/file/ripgrep.ts (+77 -45)

📄 Description

feat: Replace unzip with @zip.js/zip.js for Windows compatibility

 **Problem:**
 Users on Windows encountered an "Executable not found in $PATH: 'unzip'" error when running `opencode.exe`, as the
  application relied on the `unzip` command for extracting `fzf.exe` and `rg.exe`. This external dependency caused issues on systems where `unzip` was not pre-installed or configured in the PATH.
 
 **Solution:**
 This PR replaces the usage of the external `unzip` command with the `@zip.js/zip.js` library for handling `.zip` file
  extraction on Windows. This change affects the download and extraction logic for `fzf.exe` in `src/file/fzf.ts` and
  `rg.exe` in `src/file/ripgrep.ts`.
 
**Benefits:**
- Improves Windows compatibility and robustness by removing the dependency on an external `unzip` executable.
- Ensures a more consistent and reliable installation experience for Windows users.
- The solution is implemented using a cross-platform JavaScript library, integrating seamlessly with the existing Bun
  runtime.

Resolves Issue #608


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/662 **Author:** [@ClayWarren](https://github.com/ClayWarren) **Created:** 7/3/2025 **Status:** ✅ Merged **Merged:** 7/24/2025 **Merged by:** [@thdxr](https://github.com/thdxr) **Base:** `dev` ← **Head:** `fix/windows-unzip-issue` --- ### 📝 Commits (2) - [`e7387e5`](https://github.com/anomalyco/opencode/commit/e7387e5bfb33446f91f2ac77d4671179a3d29f2e) feat: Replace unzip with @zip.js/zip.js for Windows compatibility - [`b38a79d`](https://github.com/anomalyco/opencode/commit/b38a79da65062c2d97b749865b7f878f17a7d6a8) Merge branch 'dev' into fix/windows-unzip-issue ### 📊 Changes **4 files changed** (+119 additions, -59 deletions) <details> <summary>View changed files</summary> 📝 `bun.lock` (+4 -0) 📝 `packages/opencode/package.json` (+2 -0) 📝 `packages/opencode/src/file/fzf.ts` (+36 -14) 📝 `packages/opencode/src/file/ripgrep.ts` (+77 -45) </details> ### 📄 Description feat: Replace unzip with @zip.js/zip.js for Windows compatibility **Problem:** Users on Windows encountered an "Executable not found in $PATH: 'unzip'" error when running `opencode.exe`, as the application relied on the `unzip` command for extracting `fzf.exe` and `rg.exe`. This external dependency caused issues on systems where `unzip` was not pre-installed or configured in the PATH. **Solution:** This PR replaces the usage of the external `unzip` command with the `@zip.js/zip.js` library for handling `.zip` file extraction on Windows. This change affects the download and extraction logic for `fzf.exe` in `src/file/fzf.ts` and `rg.exe` in `src/file/ripgrep.ts`. **Benefits:** - Improves Windows compatibility and robustness by removing the dependency on an external `unzip` executable. - Ensures a more consistent and reliable installation experience for Windows users. - The solution is implemented using a cross-platform JavaScript library, integrating seamlessly with the existing Bun runtime. Resolves Issue #608 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:58 -05:00
yindo closed this issue 2026-02-16 18:13:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9675