mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
Fixed: Set musl status at compile time
This commit is contained in:
parent
9bf6db4187
commit
3fcd8af697
2 changed files with 6 additions and 7 deletions
|
@ -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" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue