MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / isEphemeralExec

Function isEphemeralExec

packages/cli/src/utils/installerDetection.ts:56–64  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

54 * version on the next invocation anyway.
55 */
56function 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

Callers 1

detectInstallerFunction · 0.85

Calls 1

normalizePathFunction · 0.70

Tested by

no test coverage detected