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

Function displayPath

src/utils/build-preflight.ts:32–48  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

30}
31
32export function displayPath(filePath: string): string {
33 const cwd = process.cwd();
34 const relative = path.relative(cwd, filePath);
35 if (!relative.startsWith('..') && !path.isAbsolute(relative)) {
36 return relative;
37 }
38
39 const home = os.homedir();
40 if (filePath === home) {
41 return '~';
42 }
43 if (filePath.startsWith(home + '/')) {
44 return '~/' + filePath.slice(home.length + 1);
45 }
46
47 return filePath;
48}
49
50const OPERATION_EMOJI: Record<ToolPreflightParams['operation'], string> = {
51 Build: '\u{1F528}',

Callers 15

buildHeaderParamsFunction · 0.90
createAppPathItemsFunction · 0.90
createBundleIdItemsFunction · 0.90
createInstallResultItemsFunction · 0.90
createLaunchResultItemsFunction · 0.90
createSchemeListItemsFunction · 0.90
createBuildSettingsItemsFunction · 0.90
createProjectListItemsFunction · 0.90
createCleanResultItemsFunction · 0.90

Calls

no outgoing calls

Tested by 2

displayScopedDerivedDataFunction · 0.72