Skip to content

Conversation

@SSheldon
Copy link
Contributor

@SSheldon SSheldon commented Jan 16, 2025

An optional group for a directory that does not exist is omitted as a source from the project. Unfortunately, there's a small bug in this check, and xcodegen actually checks for the group's existence relative to the current working directory. If you're running xcodegen from another directory than your project spec, this can mean that the optional directory is incorrectly detected as nonexistant and it is omitted from the project.

To fix, we just need to check the group's existence relative to the project. There's already even a convenient local variable for this, so using it means less code than before.

let path = project.basePath + targetSource.path

After this PR, optional groups are no longer skipped when generating projects from a different directory.

Copy link
Owner

@yonaskolb yonaskolb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @SSheldon

@yonaskolb yonaskolb merged commit b1e03f0 into yonaskolb:master Feb 17, 2025
1 of 2 checks passed
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