Skip to content

Conversation

@cursor
Copy link

@cursor cursor bot commented Jan 7, 2026

Add validation for xcodebuild extraArgs to prevent failures from invalid options.

The xcodebuild command fails when users pass unrecognized options like -test-arg via extraArgs. This PR introduces a validation step that checks for such invalid arguments and provides a clear error message, guiding users to use the testRunnerEnv parameter for passing environment variables to the test runner instead.


Open in Cursor Open in Web


Note

Adds a guard to prevent invalid xcodebuild flags that cause test runs to fail.

  • Introduces utils/xcodebuild-validation.ts with validateXcodebuildExtraArgs to detect invalid options (e.g., -test-arg) and return a clear, actionable error pointing to testRunnerEnv
  • Integrates validation into test_device, test_macos, and test_sim logic before invoking xcodebuild
  • Adds unit tests: utils/__tests__/xcodebuild-validation.test.ts and new validation cases in simulator/__tests__/test_sim.test.ts (exporting test_simLogic, using createMockExecutor)

Written by Cursor Bugbot for commit 6da6db7. This will update automatically on new commits. Configure here.

Adds validation for xcodebuild extraArgs to prevent invalid options.

Co-authored-by: cameron.cooke <cameron.cooke@sentry.io>
@cursor
Copy link
Author

cursor bot commented Jan 7, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 7, 2026

Open in StackBlitz

npm i https://pkg.pr.new/cameroncooke/XcodeBuildMCP/xcodebuildmcp@169

commit: 6da6db7

@cameroncooke cameroncooke marked this pull request as ready for review January 8, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants