MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / getSocketPath

Function getSocketPath

src/daemon/socket-path.ts:52–66  ·  view source on GitHub ↗
(opts?: GetSocketPathOptions)

Source from the content-addressed store, hash-verified

50}
51
52export function getSocketPath(opts?: GetSocketPathOptions): string {
53 const env = opts?.env ?? process.env;
54
55 if (env.XCODEBUILDMCP_SOCKET) {
56 return env.XCODEBUILDMCP_SOCKET;
57 }
58
59 const cwd = opts?.cwd ?? process.cwd();
60 const workspaceRoot = resolveWorkspaceRoot({
61 cwd,
62 projectConfigPath: opts?.projectConfigPath,
63 });
64
65 return socketPathForWorkspaceRoot(workspaceRoot);
66}
67
68function validateSocketDir(dir: string): void {
69 const linkStat = lstatSync(dir);

Callers 4

mainFunction · 0.90
mainFunction · 0.90
constructorMethod · 0.90
defaultSocketPathFunction · 0.85

Calls 2

resolveWorkspaceRootFunction · 0.90

Tested by

no test coverage detected