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

Function isXcodemakeAvailable

src/utils/xcodemake.ts:88–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86}
87
88export async function isXcodemakeAvailable(): Promise<boolean> {
89 if (!isXcodemakeEnabled()) {
90 log('debug', 'xcodemake is not enabled, skipping availability check');
91 return false;
92 }
93
94 try {
95 if (overriddenXcodemakePath && existsSync(overriddenXcodemakePath)) {
96 log('debug', `xcodemake found at overridden path: ${overriddenXcodemakePath}`);
97 return true;
98 }
99
100 const result = await getDefaultCommandExecutor()(['which', 'xcodemake']);
101 if (result.success) {
102 log('debug', 'xcodemake found in PATH');
103 return true;
104 }
105
106 log('info', 'xcodemake not found in PATH, attempting to download...');
107 const installed = await installXcodemake();
108 if (!installed) {
109 log('warn', 'xcodemake installation failed');
110 return false;
111 }
112
113 log('info', 'xcodemake installed successfully');
114 return true;
115 } catch (error) {
116 log(
117 'error',
118 `Error checking for xcodemake: ${error instanceof Error ? error.message : String(error)}`,
119 );
120 return false;
121 }
122}
123
124export function doesMakefileExist(projectDir: string): boolean {
125 return existsSync(`${projectDir}/Makefile`);

Callers 1

executeXcodeBuildCommandFunction · 0.90

Calls 5

logFunction · 0.90
isXcodemakeEnabledFunction · 0.85
existsSyncFunction · 0.85
installXcodemakeFunction · 0.85

Tested by

no test coverage detected