xcpretty / xcode-install

🔽 Install and update your Xcodes
https://fastlane.tools
MIT License
2.59k stars 239 forks source link

xcversion select 8 --symlink not working #274

Open KeMyDrive opened 6 years ago

KeMyDrive commented 6 years ago

if I install xcode from app store, I can create alias to open xcode project directly from terminal. open -a Xcode *.xcproject, but not I cannot

martin-braun commented 2 years ago

The symlink functionality is bugged I think. I installed 12.5.1 and 13.2.1. I previously selected 12.5.1 and when I do xcversion select 13.2.1 it does not update the Xcode.app symlink. I tried to remove the symlink first rm -rf /Applications/Xcode.app, but xcversion still fails to create the symlink when using select.

I bypass this with a script now:

xcodePackageLink="/Applications/Xcode.app"
rm -rf $xcodePackageLink
xcversion select $1
if [[ ! -L $xcodePackageLink ]]; then
    sudo ln -s /Applications/Xcode-$1.app $xcodePackageLink
fi