Open the-hotmann opened 5 months ago
The version likely comes from /etc/lsb-release
, which doesn't contain the patch revision in a correct format for machines. Changing that output would also break any app that's looking for a specific version that suddenly includes a patch revision.
same is true for windows build version. The information would be available from host.platformInformation() but that's not exported as public interface anywhere (anymore). v3 host.PlatformInformationWithContext() contained the build number. How can i access this information with v4?
Sorry for the late reply.
Agree with @davidnewhall, retrieving the patch version of Ubuntu would significantly break compatibility, so I believe a major version upgrade is necessary.
As you mentioned, in the v4 major version upgrade, PlatformVersion()
was changed from the Windows build version (e.g., 10.0.22631.3447
) to something like 23H2
. However, you can still obtain the build version using KernelVersion()
. See #1629.
When I get run:
On debian I get
11.9
whilecat /etc/*release*
just shows:Which means the tool is more precise than simple shell calls.
But on Ubuntu it gives me back
22.04
Whilecat /etc/*release*
lets me exactly know that it is22.04.4
. I would like it to display the exact version - including the patch-version - on Ubuntu (22.04.4
), not just the Major and Minir version.I hope this is not too much to ask for :)
Thanks for this nice tool!