anomalyco / anomalyco/opencode

Windows archive extraction fails for paths containing apostrophes or wildcard characters

Open
#43,036 2 comments 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 17, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

On Windows, extractZip interpolates the archive and destination paths into a PowerShell command using single-quoted strings.

A valid path containing an apostrophe breaks the quoted command. Additionally, Expand-Archive -Path interprets characters such as [ and ] as wildcard syntax.

As a result, LSP installation can fail when the user profile, temporary directory, archive name, or destination path contains these characters.

Expected: archive and destination paths are passed to PowerShell literally.

Actual: Expand-Archive exits with an argument parsing or archive-not-found error.

Plugins

None

OpenCode version

dev at 4d68d30b4 (packages/opencode 1.18.18)

Steps to reproduce
  1. On Windows, create a valid ZIP file named archive's [copy].zip.
  2. Call Archive.extractZip() with that archive and a destination such as destination's [copy].
  3. Observe that PowerShell fails to parse or locate the archive path.

This also affects LSP installers that use Archive.extractZip().

Screenshot and/or share link

N/A

Operating System

Windows (win32)

Terminal

Windows PowerShell (powershell.exe)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.