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
commit e48da96886
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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