Skip to content

Commit

Permalink
[macOS] Return the correct minor version on 11 and later OS. (#3605)
Browse files Browse the repository at this point in the history
* [macOS] Return the correct minor version on 11 and later OS.

The OS returned from 11.0 and later is:

11.* = 20.6.0.0
12.* - 21.2.0.0

The minor in those versions is correct. This fix ensures that Agent
capabilities can match the minor version too.

Co-authored-by: Alexander Smolyakov <[email protected]>
Co-authored-by: Anatoly Bolshakov <[email protected]>
  • Loading branch information
3 people authored Jan 17, 2022
1 parent 8d2c6e3 commit b18c35e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private static string GetDarwinVersionString()
}
else
{
return $"11.{version.Major - 20}";
return $"{version.Major - 9}.{(version.Minor > 0 ? version.Minor - 1 : version.Minor)}";
}
}
}
Expand Down

0 comments on commit b18c35e

Please sign in to comment.