getVersionSync method
Returns the version of executable.
Implementation
@override
Version getVersionSync() {
//
// Major Minor Build Revision
// ----- ----- ----- --------
// 5 1 19041 3803
//
//
final parts = runSync([r"$PSVersionTable.PSVersion"])
.stdout
.toString()
.split("\n")[3]
.split(RegExp(r"\s+"))
.toList();
return Version(
parts[0].toInt(),
parts[1].toInt(),
0,
build: parts[2],
);
}