Skip to content

Export DEVELOPER_DIR instead of invoking xcode-select to set the active Xcode version #62

Open
@bobergj

Description

Export the DEVELOPER_DIR environment variable instead of invoking xcode-select to set the active Xcode version.

Setting the active Xcode version with sudo xcode-select changes the setting system wide.
Github actions can also be run with a self-hosted runner: https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners. When using a self-hosted github runner, the run isn't necessarily containerized. Changing the system-wide Xcode version then creates conflicts between concurrent runs.

From man xcode-select:

ENVIRONMENT
DEVELOPER_DIR
Overrides the active developer directory. When DEVELOPER_DIR is set, its value will be used instead of the system-wide active developer directory.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions