Attempt to handle not found System.Runtime.InteropServices.RuntimeInformation

https://github.com/Jackett/Jackett/issues/3816
This commit is contained in:
flightlevel
2018-09-24 19:24:17 +10:00
parent 2f378210d9
commit f9b4b5a76c
5 changed files with 35 additions and 14 deletions

View File

@@ -4,8 +4,6 @@ using Jackett.Common.Utils;
using Jackett.Server.Services;
using NLog;
using System;
using System.Linq;
using System.Runtime.InteropServices;
namespace Jackett.Server
{
@@ -113,8 +111,8 @@ namespace Jackett.Server
{
logger.Info("Overriding port to " + consoleOptions.Port);
serverConfig.Port = consoleOptions.Port;
bool isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
if (isWindows)
if (EnvironmentUtil.IsWindows)
{
if (ServerUtil.IsUserAdministrator())
{
@@ -137,7 +135,7 @@ namespace Jackett.Server
{
logger.Info("Overriding external access to " + consoleOptions.ListenPublic);
serverConfig.AllowExternal = consoleOptions.ListenPublic;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
if (EnvironmentUtil.IsWindows)
{
if (ServerUtil.IsUserAdministrator())
{