MCPcopy
hub / github.com/claude-code-best/claude-code / isBunInstallation

Function isBunInstallation

src/cli/updateCCB.ts:48–62  ·  view source on GitHub ↗

* Detect whether the current installation was done via bun. * Checks if the binary path contains "bun" or if bun's global install dir has our package.

()

Source from the content-addressed store, hash-verified

46 * Checks if the binary path contains "bun" or if bun's global install dir has our package.
47 */
48function isBunInstallation(): boolean {
49 // Check if the running binary is under bun's global install path
50 const execPath = process.execPath
51 if (execPath.includes('bun')) {
52 return true
53 }
54
55 // Check bun's global install directory
56 const bunGlobalDir = join(homedir(), '.bun', 'install', 'global')
57 if (existsSync(join(bunGlobalDir, 'node_modules', PACKAGE_NAME))) {
58 return true
59 }
60
61 return false
62}
63
64/**
65 * Get the latest version from npm registry.

Callers 1

updateCCBFunction · 0.85

Calls 1

existsSyncFunction · 0.85

Tested by

no test coverage detected