in JetBrains.HabitatDetector/src/Impl/Linux/LinuxHelper.cs [179:194]
internal static Version ParseGlibcLddOutput(string output)
{
var regex = new Regex(@"^ldd\s\(.+\)\s(?<version>[\d\.]+)");
var grp = regex.Match(output).Groups["version"];
if (!grp.Success)
throw new FormatException($"Failed to extract GLibC version from ldd output: {output}");
var versionStr = grp.Captures[0].Value;
try
{
return new Version(versionStr);
}
catch (Exception e)
{
throw new FormatException($"Failed to parse GLibC version {versionStr} from ldd output: {output}", e);
}
}