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

Function getBundledAxeEnvironment

src/utils/axe-helpers.ts:141–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

139 * Get environment variables needed for bundled AXe to run
140 */
141export function getBundledAxeEnvironment(): Record<string, string> {
142 const resolved = resolveAxeBinary();
143 if (resolved?.source !== 'bundled') {
144 return {};
145 }
146
147 const frameworksDir = getBundledFrameworksDir();
148 if (!existsSync(frameworksDir)) {
149 return {};
150 }
151
152 const currentFrameworkPath = process.env.DYLD_FRAMEWORK_PATH;
153 const frameworkPath = currentFrameworkPath
154 ? `${frameworksDir}${delimiter}${currentFrameworkPath}`
155 : frameworksDir;
156
157 return { DYLD_FRAMEWORK_PATH: frameworkPath };
158}
159
160/**
161 * Check if axe tool is available (bundled, env override, or PATH)

Callers 2

dismissFirstRunPromptsFunction · 0.90

Calls 3

getBundledFrameworksDirFunction · 0.90
resolveAxeBinaryFunction · 0.85
existsSyncFunction · 0.85

Tested by

no test coverage detected