Catch json parse error, generalize to hashtable to bypass key overlap issue. - #238
Merged
Josh Wittner (jwittner) merged 1 commit intoAug 4, 2022
Conversation
Josh Wittner (jwittner)
requested review from
Cierra Shawe (cishawe) and
Derek (derekfreed)
August 4, 2022 00:54
Cierra Shawe (cishawe)
approved these changes
Aug 4, 2022
Contributor
|
Note that this requires PowerShell core |
Member
Author
Good catch. Honestly I'm tempted to simply drop support for PS 5, but I'll make an update to try and support it in this code path still asap. |
Member
Author
|
Did some testing and while it errors out due to the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Unity hub is writing 'preSelected' and 'preselected' to the manifest so I'm not parsing all the json into a hash table and looking at all download urls instead of requiring an understanding of the module shape in the json.
Also catching any future json parse errors, logging them to verbose, and not skipping the rest of the searches which may still work.
Note this appears to be a UnityHub issue rather than being tied to a particular unity version.
Resolves #237