Skip to content

Commit 0e94c98

Browse files
committed
fix: убрал зависимость от InteropServices
Переписал проверку ОС с помощью System.Environment.OSVersion.Platform
1 parent 4927107 commit 0e94c98

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/ScriptEngine.HostedScript/Library/Http/InternetProxyContext.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ This Source Code Form is subject to the terms of the
1010
using System.Collections.Generic;
1111
using System.Linq;
1212
using System.Net;
13-
using System.Runtime.InteropServices;
1413

1514
namespace ScriptEngine.HostedScript.Library.Http
1615
{
@@ -36,7 +35,7 @@ public InternetProxyContext(bool useDefault)
3635

3736
if (useDefault)
3837
{
39-
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
38+
if (System.Environment.OSVersion.Platform == System.PlatformID.Unix)
4039
{
4140
var httpEnv = System.Environment.GetEnvironmentVariable(LINUX_ENV_HTTP);
4241
_proxies[Uri.UriSchemeHttp] = httpEnv == null ? emptyProxy :

src/ScriptEngine.HostedScript/ScriptEngine.HostedScript.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<ItemGroup>
1010
<PackageReference Include="DotNetZip" Version="1.13.3" />
1111
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
12-
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
1312
<ProjectReference Include="..\ScriptEngine\ScriptEngine.csproj" />
1413
</ItemGroup>
1514
<PropertyGroup>

0 commit comments

Comments
 (0)