From e41b455141d89589cb938d381942ea964c317f01 Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Tue, 7 Jun 2016 11:35:40 -0700 Subject: [PATCH] Update --- .../Startup/StartupExceptionPage.cs | 20 ++----------------- .../resources/GenericError_Footer.html | 2 +- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/Microsoft.AspNetCore.Hosting/Startup/StartupExceptionPage.cs b/src/Microsoft.AspNetCore.Hosting/Startup/StartupExceptionPage.cs index eb06f9388e..32fac13137 100644 --- a/src/Microsoft.AspNetCore.Hosting/Startup/StartupExceptionPage.cs +++ b/src/Microsoft.AspNetCore.Hosting/Startup/StartupExceptionPage.cs @@ -247,26 +247,10 @@ namespace Microsoft.AspNetCore.Hosting var currentAssemblyVersion = currentAssembly.GetCustomAttribute().InformationalVersion; currentAssemblyVersion = HtmlEncodeAndReplaceLineBreaks(currentAssemblyVersion); - var osName = string.Empty; - var osVersion = string.Empty; - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - osName = OSPlatform.Windows.ToString(); - osVersion = Microsoft.Extensions.Internal.RuntimeEnvironment.OperatingSystemVersion; - } - else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - osName = OSPlatform.Linux.ToString(); - } - else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - osName = OSPlatform.OSX.ToString(); - } - var os = HtmlEncodeAndReplaceLineBreaks(osName); - osVersion = HtmlEncodeAndReplaceLineBreaks(osVersion); + var osDescription = HtmlEncodeAndReplaceLineBreaks(RuntimeInformation.OSDescription); return string.Format(CultureInfo.InvariantCulture, _errorFooterFormatString, runtimeDisplayName, runtimeArch, clrVersion, - currentAssemblyVersion, os, osVersion); + currentAssemblyVersion, osDescription); } private static string HtmlEncodeAndReplaceLineBreaks(string input) diff --git a/src/Microsoft.AspNetCore.Hosting/compiler/resources/GenericError_Footer.html b/src/Microsoft.AspNetCore.Hosting/compiler/resources/GenericError_Footer.html index 7a90dbff40..fe54861d87 100644 --- a/src/Microsoft.AspNetCore.Hosting/compiler/resources/GenericError_Footer.html +++ b/src/Microsoft.AspNetCore.Hosting/compiler/resources/GenericError_Footer.html @@ -1,3 +1,3 @@