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

Function tryFileUrlToPath

src/utils/project-config.ts:118–129  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

116}
117
118function tryFileUrlToPath(value: string): string | null {
119 if (!value.startsWith('file:')) {
120 return null;
121 }
122
123 try {
124 return fileURLToPath(value);
125 } catch (error) {
126 log('warn', `Failed to parse file URL path: ${value}. ${String(error)}`);
127 return null;
128 }
129}
130
131function normalizePathValue(value: string, cwd: string): string {
132 const fileUrlPath = tryFileUrlToPath(value);

Callers 1

normalizePathValueFunction · 0.85

Calls 1

logFunction · 0.90

Tested by

no test coverage detected