From bf21751bdc010490296200b9fced091927f8c217 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Wed, 1 Apr 2026 12:02:39 -0400 Subject: [PATCH] chore: remove Windows tar workaround from npm module --- packages/opencode/src/npm/index.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/packages/opencode/src/npm/index.ts b/packages/opencode/src/npm/index.ts index 9cbd274be8..99d082f5dd 100644 --- a/packages/opencode/src/npm/index.ts +++ b/packages/opencode/src/npm/index.ts @@ -1,14 +1,3 @@ -// Workaround: Bun on Windows does not support the UV_FS_O_FILEMAP flag that -// the `tar` package uses for files < 512KB (fs.open returns EINVAL). -// tar silently swallows the error and skips writing files, leaving only empty -// directories. Setting __FAKE_PLATFORM__ makes tar fall back to the plain 'w' -// flag. See tar's get-write-flag.js. -// Must be set before @npmcli/arborist is imported since tar caches the flag -// at module evaluation time — so we use a dynamic import() below. -if (process.platform === "win32") { - process.env.__FAKE_PLATFORM__ = "linux" -} - import semver from "semver" import z from "zod" import { NamedError } from "@opencode-ai/util/error"