mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 12:32:31 +01:00
Fixed: Set musl status at compile time
[common]
This commit is contained in:
parent
f0bb614360
commit
e3cc4f4cb1
@ -97,16 +97,14 @@ private static Os GetPosixFlavour()
|
|||||||
}
|
}
|
||||||
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)
|
||||||
{
|
{
|
||||||
var processStartInfo = new ProcessStartInfo
|
var processStartInfo = new ProcessStartInfo
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net5.0;net472</TargetFrameworks>
|
<TargetFrameworks>net5.0;net472</TargetFrameworks>
|
||||||
|
<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" />
|
||||||
|
Loading…
Reference in New Issue
Block a user