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

Function resolveEntry

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

* `process.argv[1]` points at the CLI entry script but on global installs the * entry is usually a shim in a `bin/` dir that symlinks to the real install * under `lib/node_modules/`. Resolve through the symlink so the classifier * sees the canonical install prefix.

()

Source from the content-addressed store, hash-verified

26 * sees the canonical install prefix.
27 */
28function resolveEntry(): string | null {
29 const entry = process.argv[1];
30 if (!entry) return null;
31 try {
32 return realpathSync(entry);
33 } catch {
34 return entry;
35 }
36}
37
38function normalizePath(path: string): string {
39 return path.replaceAll("\\", "/");

Callers 1

detectInstallerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected