-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Approved license version is always updated to version being installed, even if current approved license is newer #111
Comments
Sounds right, thanks for the detailed write-up. A PR would be greatly appreciated, of course :) |
I've recently noticed the same. Also related: #71 - maybe https://github.com/neonichu/liferaft could be used to do the version comparison. |
Btw, why isn't |
It doesn't necessarily work, see #65 |
In my experience it's always written out the license data properly to the plist, but only for the version of Xcode containing the I recently wrote this up here: https://macops.ca/deploying-xcode-the-trick-with-accepting-license-agreements/ A quick but dirty solution is to run |
Any updates on this one? |
Not really, I would be happy to merge a PR, but since this is an edge case, I will probably not be able to dedicate time to it myself. |
https://github.com/neonichu/xcode-install/blob/9b08988e0ba8da6693b5961f0d23598ea584f853/lib/xcode/install.rb#L101
approve_license
is always invoked on installation. This has the possibility to overwrite the approval with an older version, thereby invalidating the approval of the license for any installed Xcode newer than that version.Steps to reproduce (assuming Xcode 7.2 and 7.0 are not installed):
xcversion install 7.2
DEVELOPER_DIR=/Applications/Xcode-7.2.app/Contents/Developer agvtool
(or some other binary in Xcode) -- notice there is no prompt for license when using Xcode 7.2xcversion install 7
DEVELOPER_DIR=/Applications/Xcode-7.app/Contents/Developer agvtool
(or some other binary in Xcode) -- notice there is no prompt for license when using Xcode 7.0DEVELOPER_DIR=/Applications/Xcode-7.2.app/Contents/Developer agvtool
(or some other binary in Xcode) -- notice there _is now_ a prompt to accept the license when using Xcode 7.2 OR when you're not the root user the command will fail with a rather ambiguous erroragvtool: error: unable to find utility "agvtool", not a developer tool or in PATH
because Xcode thinks the license has not been accepted yetExpected:
No need to accept license for all installed Xcodes
Actual:
License must be accepted again manually for latest Xcode version in order to remove prompts for any version between the most recent Xcode installed and the latest
Suggestion:
Add logic to
approve_license
to ensure the value ofIDEXcodeVersionForAgreedToGMLicense
is less than the version being installed before updating the agreement preference.Let me know what you think. I can work a PR if necessary.
The text was updated successfully, but these errors were encountered: