Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix checking optional group existence relative to the current working dir #1529

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

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.

1 participant