From e3cc4f4cb14b9d6f21b3d29d32facc64355aa088 Mon Sep 17 00:00:00 2001 From: ta264 Date: Thu, 21 Jan 2021 21:16:33 +0000 Subject: [PATCH] Fixed: Set musl status at compile time [common] --- src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs | 12 +++++------- src/NzbDrone.Common/Radarr.Common.csproj | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs index 92b6b0cbc..23b3ab885 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs @@ -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) { var processStartInfo = new ProcessStartInfo diff --git a/src/NzbDrone.Common/Radarr.Common.csproj b/src/NzbDrone.Common/Radarr.Common.csproj index 5e8a180c0..39dedf750 100644 --- a/src/NzbDrone.Common/Radarr.Common.csproj +++ b/src/NzbDrone.Common/Radarr.Common.csproj @@ -1,6 +1,7 @@  net5.0;net472 + ISMUSL