* True when invoked via `npx hyperframes` / `bunx hyperframes`. These don't * persist an install, so auto-update is a no-op — the user gets the latest * version on the next invocation anyway.
(realEntry: string)
| 54 | * version on the next invocation anyway. |
| 55 | */ |
| 56 | function isEphemeralExec(realEntry: string): boolean { |
| 57 | const normalized = normalizePath(realEntry); |
| 58 | // npm's npx caches into `<prefix>/_npx/<hash>/`; bun uses `bunx-<uid>-…`. |
| 59 | return ( |
| 60 | normalized.includes("/_npx/") || |
| 61 | normalized.includes("/.npm/_npx/") || |
| 62 | posix.basename(posix.dirname(normalized)).startsWith("bunx-") |
| 63 | ); |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * True when the binary was linked into Homebrew's install tree. Homebrew |
no test coverage detected