Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix major and minor version parsing on older Windows (#175)
On Windows versions earlier than 10/2016, the `Major` version was getting overwritten with what would have been the `Minor` version, and the `Minor` version was not being set. Windows 7: Before fix: ``` "os": { "type": "windows", "family": "windows", "platform": "windows", "name": "Windows 7 Enterprise", "version": "6.1", "major": 1, "minor": 0, "patch": 0, "build": "7601.0" }, ``` With fix: ``` "os": { "type": "windows", "family": "windows", "platform": "windows", "name": "Windows 7 Enterprise", "version": "6.1", "major": 6, "minor": 1, "patch": 0, "build": "7601.0" }, ``` Windows 8: Before fix: ``` "os": { "type": "windows", "family": "windows", "platform": "windows", "name": "Windows 8 Enterprise", "version": "6.2", "major": 2, "minor": 0, "patch": 0, "build": "9200.0" }, ``` With fix: ``` "os": { "type": "windows", "family": "windows", "platform": "windows", "name": "Windows 8 Enterprise", "version": "6.2", "major": 6, "minor": 2, "patch": 0, "build": "9200.0" }, ``` Win 10: Separate code path, unimpacted, same before and after: ``` "os": { "type": "windows", "family": "windows", "platform": "windows", "name": "Windows 11 Pro", "version": "10.0", "major": 10, "minor": 0, "patch": 0, "build": "22621.1702" }, ``` --------- Co-authored-by: Andrew Kroh <[email protected]>
- Loading branch information