diff --git a/lib/xcode/install.rb b/lib/xcode/install.rb index 911defa5..ee2d03a0 100644 --- a/lib/xcode/install.rb +++ b/lib/xcode/install.rb @@ -109,6 +109,9 @@ def install_dmg(dmgPath, suffix = '', switch = true) `sudo xcodebuild -license` unless xcode_license_approved? if switch + `sudo rm -f #{SYMLINK_PATH}` unless current_symlink.nil? + `sudo ln -sf #{xcode_path} #{SYMLINK_PATH}` unless SYMLINK_PATH.exist? + `sudo xcode-select --switch #{xcode_path}` puts `xcodebuild -version` end