Update packages/opencode/src/npm/index.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Dax
2026-03-19 23:32:30 -04:00
committed by GitHub
parent 20249bb723
commit e48da96886
+1 -1
View File
@@ -160,7 +160,7 @@ export namespace Npm {
).catch(() => undefined)
if (pkgJson?.bin) {
const bin = pkgJson.bin
if (typeof bin === "string") return path.basename(bin)
if (typeof bin === "string") return unscoped
const keys = Object.keys(bin)
if (keys.length === 1) return keys[0]
const unscoped = pkg.startsWith("@") ? pkg.split("/")[1] : pkg