}
}
}
+ // possibly should fall back to /usr/lib/os-release here
if (result != null)
{
result = NormalizeDistroInfo(result);
}
-
+
return result;
}
distroInfo.VersionId = distroInfo.VersionId.Substring(0, lastVersionNumberSeparatorIndex);
}
+ // In some distros/versions we cannot discover the distro version; return something valid.
+ // Pick a high version number, since this seems to happen on newer distros.
+ if (string.IsNullOrEmpty(distroInfo.VersionId))
+ {
+ distroInfo.VersionId = new Version(Int32.MaxValue, Int32.MaxValue).ToString();
+ }
+
return distroInfo;
}