Skip to content

Xcodemake argument string replacement#178

Merged
cameroncooke merged 1 commit intomainfrom
2026-01-17t160247518z-error-macos-j0zk2v
Jan 17, 2026
Merged

Xcodemake argument string replacement#178
cameroncooke merged 1 commit intomainfrom
2026-01-17t160247518z-error-macos-j0zk2v

Conversation

@cursor
Copy link
Contributor

@cursor cursor bot commented Jan 17, 2026

Fixes xcodemake command argument corruption during macOS builds.

The global string replacement of the project directory in all arguments was causing Swift source file paths and other arguments to be malformed, leading to build failures. The fix ensures replacement only occurs when the project directory is a prefix of an argument.

Fixes XCODEBUILD-MCP-12S9


Open in Cursor Open in Web


Note

Fixes xcodemake argument handling

  • In executeXcodemakeCommand, replace global string replacement with prefix-only stripping of projectDir/ to avoid corrupting non-path arguments
  • Update CHANGELOG.md under Fixed to note the xcodemake argument corruption fix

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

The executeXcodemakeCommand function was using .replace() to remove project
directory paths from arguments, which would corrupt any argument containing
the project directory path as a substring (not just as a prefix).

Changed to use .startsWith() and .substring() to only remove the project
directory when it appears as a path prefix, matching the approach already
used in doesMakeLogFileExist.

Fixes XCODEBUILD-MCP-12S9
@cursor
Copy link
Contributor Author

cursor bot commented Jan 17, 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 17, 2026

Open in StackBlitz

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

commit: 9afdfc7

@cameroncooke cameroncooke marked this pull request as ready for review January 17, 2026 19:21
@cameroncooke cameroncooke merged commit a30ffe9 into main Jan 17, 2026
8 checks passed
@cameroncooke cameroncooke deleted the 2026-01-17t160247518z-error-macos-j0zk2v branch January 17, 2026 22:45
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