-
Notifications
You must be signed in to change notification settings - Fork 154
Description
π Request Summary
First of all, thank you for maintaining xcodes
β it's an incredibly helpful tool for managing Xcode versions both locally and in CI environments.
Iβm currently using xcodes
in a self-hosted CI runner and ran into a limitation with the --select
command, which requires superuser privileges. The current implementation prompts for a password interactively:
xcodes/Sources/XcodesKit/XcodeSelect.swift
Lines 135 to 141 in 938adbc
let passwordInput = { | |
Promise<String> { seal in | |
Current.logging.log("xcodes requires superuser privileges to select an Xcode") | |
guard let password = Current.shell.readSecureLine(prompt: "macOS User Password: ") else { seal.reject(XcodeInstaller.Error.missingSudoerPassword); return } | |
seal.fulfill(password + "\n") | |
} | |
} |
β¨ Feature Proposal
Would it be possible to enhance this behavior by optionally allowing the password to be provided via an environment variable β for example:
export XCODES_SUDO_PASSWORD=your_password
When this variable is set, xcodes could use its value instead of prompting interactively.
β Benefits
This would be extremely useful in non-interactive environments such as:
- GitHub Actions
- Self-hosted CI runners
- Local automation scripts
It would allow full automation of xcodes install --select without manual intervention.