MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / createBootSimExecutor

Function createBootSimExecutor

src/mcp/tools/simulator/boot_sim.ts:86–121  ·  view source on GitHub ↗
(
  executor: CommandExecutor,
)

Source from the content-addressed store, hash-verified

84}
85
86export function createBootSimExecutor(
87 executor: CommandExecutor,
88): NonStreamingExecutor<ResolvedBootSimParams, BootSimResult> {
89 return async (params) => {
90 try {
91 const result = await executor(
92 ['xcrun', 'simctl', 'boot', params.simulatorId],
93 'Boot Simulator',
94 false,
95 );
96
97 if (!result.success) {
98 const diagnosticMessage = result.error ?? 'Unknown error';
99 return createBootSimResult({
100 simulatorId: params.simulatorId,
101 didError: true,
102 error: 'Boot simulator operation failed.',
103 diagnosticMessage,
104 });
105 }
106
107 return createBootSimResult({
108 simulatorId: params.simulatorId,
109 didError: false,
110 });
111 } catch (error) {
112 const diagnosticMessage = toErrorMessage(error);
113 return createBootSimResult({
114 simulatorId: params.simulatorId,
115 didError: true,
116 error: 'Boot simulator operation failed.',
117 diagnosticMessage,
118 });
119 }
120 };
121}
122
123export async function boot_simLogic(
124 params: BootSimParams,

Callers 1

boot_simLogicFunction · 0.85

Calls 3

toErrorMessageFunction · 0.90
createBootSimResultFunction · 0.85
executorFunction · 0.50

Tested by

no test coverage detected