mirror of
https://github.com/Readarr/Readarr
synced 2025-12-20 07:13:17 +01:00
Fixed: Set musl status at compile time
This commit is contained in:
parent
64e2f6457d
commit
d7cdbbecc8
2 changed files with 6 additions and 7 deletions
|
|
@ -97,16 +97,14 @@ private static Os GetPosixFlavour()
|
|||
}
|
||||
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)
|
||||
{
|
||||
Process p = new Process();
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<PropertyGroup>
|
||||
<TargetFrameworks>net462;netcoreapp3.1</TargetFrameworks>
|
||||
<NeutralLanguage>en</NeutralLanguage>
|
||||
<DefineConstants Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64' or '$(RuntimeIdentifier)' == 'linux-musl-arm64'">ISMUSL</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DotNet4.SocksProxy" Version="1.4.0.1" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue