We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c526caa commit 8a8f7b3Copy full SHA for 8a8f7b3
1 file changed
packages/opencode/src/npm/index.ts
@@ -2,7 +2,6 @@ import semver from "semver"
2
import z from "zod"
3
import { NamedError } from "@opencode-ai/util/error"
4
import { Global } from "../global"
5
-import { Lock } from "../util/lock"
6
import { Log } from "../util/log"
7
import path from "path"
8
import { readdir, rm } from "fs/promises"
@@ -57,11 +56,11 @@ export namespace Npm {
57
56
}
58
59
export async function add(pkg: string) {
60
- using _ = await Lock.write(`npm-install:${pkg}`)
+ const dir = directory(pkg)
+ await using _ = await Flock.acquire(`npm-install:${Filesystem.resolve(dir)}`)
61
log.info("installing package", {
62
pkg,
63
})
64
- const dir = directory(pkg)
65
66
const arborist = new Arborist({
67
path: dir,
0 commit comments