lib/xcode/install.rb in xcode-install-2.0.5 vs lib/xcode/install.rb in xcode-install-2.0.6
- old
+ new
@@ -471,10 +471,10 @@
@downloadable_index_url ||= "https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/index-#{bundle_version}-#{uuid}.dvtdownloadableindex"
end
def approve_license
license_path = "#{@path}/Contents/Resources/English.lproj/License.rtf"
- license_id = IO.read(license_path).match(/^EA\d{4}/)
+ license_id = IO.read(license_path).match(/\bEA\d{4}\b/)
license_plist_path = '/Library/Preferences/com.apple.dt.Xcode.plist'
`sudo rm -rf #{license_plist_path}`
`sudo /usr/libexec/PlistBuddy -c "add :IDELastGMLicenseAgreedTo string #{license_id}" #{license_plist_path}`
`sudo /usr/libexec/PlistBuddy -c "add :IDEXcodeVersionForAgreedToGMLicense string #{@version}" #{license_plist_path}`
end