Support macOS 11 Big Sur Binary Downloads #380
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was some compatibility code for Golang versions less than 1.4.3 that broke installs on Big Sur. Prior to 1.4.3, there were two versions for osx10.8 and osx10.6. 1.4.3 introduced a unified amd64 version. When OS X changed the major version from 10 to 11, that logic broke.
This patch moves that compatibility logic into the "less than 1.4.3" check, and now checks both the major and minor version of macOS.
I tried a different patch that would download
go1.4.2.darwin-amd64-osx10.8.pkg
on Big Sur, and it installed successfully, butgo version
printed a stack trace, so I adjusted the patch to printBinary Go unavailable for this platform
. I tested,go1.4.2
and it installs, but also crashes.go1.5
installed and passed mygo version
test. We could write more code to protect Big Sur users from this, but I doubt many developers are still trying to use a Golang from 2015 on Big Sur, and I don't think mygo version
test is a comprehensive compatibility test anyways.PS: I included a whitespace-only commit, as a few lines used spaces for indentation while the overwhelming majority of the file used tabs.