Skip to content

Catch json parse error, generalize to hashtable to bypass key overlap issue. - #238

Merged
Josh Wittner (jwittner) merged 1 commit into
microsoft:developfrom
jwittner:fix/moduleJsonVersionSearch
Aug 4, 2022
Merged

Catch json parse error, generalize to hashtable to bypass key overlap issue.#238
Josh Wittner (jwittner) merged 1 commit into
microsoft:developfrom
jwittner:fix/moduleJsonVersionSearch

Conversation

@jwittner

Copy link
Copy Markdown
Member

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

@jwittner
Josh Wittner (jwittner) merged commit 0614dc7 into microsoft:develop Aug 4, 2022
@redwyre

redwyre commented Aug 4, 2022

Copy link
Copy Markdown
Contributor

Note that this requires PowerShell core

@jwittner

Josh Wittner (jwittner) commented Aug 4, 2022

Copy link
Copy Markdown
Member Author

Note that this requires PowerShell core

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.

@jwittner

Copy link
Copy Markdown
Member Author

Did some testing and while it errors out due to the AsHashTable, all supported versions of Unity do seem to still be discovered by the later methods of testing. If anyone finds that to not be true or needs this test to work in PS 5, please file an issue and we'll work on a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to identify installation of 2021.3.6f1 due to duplicate keys in modules.json

3 participants