mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-22 09:29:59 +00:00
Fixed: Set musl status at compile time
This commit is contained in:
@@ -97,16 +97,14 @@ namespace NzbDrone.Common.EnvironmentInfo
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return IsMusl() ? Os.LinuxMusl : Os.Linux;
|
#if ISMUSL
|
||||||
|
return Os.LinuxMusl;
|
||||||
|
#else
|
||||||
|
return Os.Linux;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool IsMusl()
|
|
||||||
{
|
|
||||||
var output = RunAndCapture("ldd", "/bin/ls");
|
|
||||||
return output.Contains("libc.musl");
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string RunAndCapture(string filename, string args)
|
private static string RunAndCapture(string filename, string args)
|
||||||
{
|
{
|
||||||
Process p = new Process();
|
Process p = new Process();
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;netcoreapp3.1</TargetFrameworks>
|
<TargetFrameworks>net462;netcoreapp3.1</TargetFrameworks>
|
||||||
<NeutralLanguage>en</NeutralLanguage>
|
<NeutralLanguage>en</NeutralLanguage>
|
||||||
|
<DefineConstants Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64' or '$(RuntimeIdentifier)' == 'linux-musl-arm64'">ISMUSL</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DotNet4.SocksProxy" Version="1.4.0.1" />
|
<PackageReference Include="DotNet4.SocksProxy" Version="1.4.0.1" />
|
||||||
|
|||||||
Reference in New Issue
Block a user