diff options
| author | Sebastian <[email protected]> | 2026-04-02 02:21:26 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-02 00:21:26 +0000 |
| commit | 8a8f7b3e90a247295fa89b66b8a854ce14042b32 (patch) | |
| tree | 635b2da709ebcd194d7c4046499898df9ddcd9a8 /packages | |
| parent | c526caae7b5c1db4c9ed33785b1aa4d05eb97c9f (diff) | |
| download | opencode-8a8f7b3e90a247295fa89b66b8a854ce14042b32.tar.gz opencode-8a8f7b3e90a247295fa89b66b8a854ce14042b32.zip | |
flock npm.add (#20557)
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/src/npm/index.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/opencode/src/npm/index.ts b/packages/opencode/src/npm/index.ts index c17db86d4..9b913b327 100644 --- a/packages/opencode/src/npm/index.ts +++ b/packages/opencode/src/npm/index.ts @@ -2,7 +2,6 @@ import semver from "semver" import z from "zod" import { NamedError } from "@opencode-ai/util/error" import { Global } from "../global" -import { Lock } from "../util/lock" import { Log } from "../util/log" import path from "path" import { readdir, rm } from "fs/promises" @@ -57,11 +56,11 @@ export namespace Npm { } export async function add(pkg: string) { - using _ = await Lock.write(`npm-install:${pkg}`) + const dir = directory(pkg) + await using _ = await Flock.acquire(`npm-install:${Filesystem.resolve(dir)}`) log.info("installing package", { pkg, }) - const dir = directory(pkg) const arborist = new Arborist({ path: dir, |
