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

Function runDoctor

src/doctor-cli.ts:19–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17}
18
19async function runDoctor(): Promise<void> {
20 try {
21 // Using console.error to avoid linting issues as it's allowed by the project's linting rules
22 console.error(`Running XcodeBuildMCP Doctor (v${version})...`);
23 console.error('Collecting system information and checking dependencies...\n');
24
25 await bootstrapRuntime({ runtime: 'cli' });
26
27 const nonRedacted = shouldUseNonRedactedOutput(process.argv.slice(2));
28 if (nonRedacted) {
29 console.error(
30 'Warning: --non-redacted is enabled; doctor output may include sensitive data.',
31 );
32 }
33
34 const executor = getDefaultCommandExecutor();
35 const result = await doctorLogic({ nonRedacted }, executor);
36
37 if (result.content && result.content.length > 0) {
38 const textContent = result.content.find((item) => item.type === 'text');
39 if (textContent?.type === 'text') {
40 // eslint-disable-next-line no-console
41 console.log(textContent.text);
42 } else {
43 console.error('Error: Unexpected doctor result format');
44 }
45 } else {
46 console.error('Error: No doctor information returned');
47 }
48
49 console.error('\nDoctor run complete. Please include this output when reporting issues.');
50 } catch (error) {
51 console.error('Error running doctor:', error);
52 process.exit(1);
53 }
54}
55
56// Run the doctor
57runDoctor().catch((error) => {

Callers 1

doctor-cli.tsFile · 0.70

Calls 4

bootstrapRuntimeFunction · 0.90
doctorLogicFunction · 0.90

Tested by

no test coverage detected