Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved OS detection #69

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Core/LocalAdmin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -595,9 +595,7 @@ private static void SetupExitHandlers()
AppDomainHandler.Handler.Setup();

if (OperatingSystem.IsWindows())
{
WindowsHandler.Handler.Setup();
}
else if (OperatingSystem.IsLinux())
{
#if LINUX_SIGNALS
Expand Down
4 changes: 2 additions & 2 deletions IO/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public class Config
public bool LaLiveViewUseUtc;

public bool LaShowStdoutStderr;
public bool LaNoSetCursor = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
public bool EnableTrueColor = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
public bool LaNoSetCursor = OperatingSystem.IsLinux();
public bool EnableTrueColor = OperatingSystem.IsLinux();
public bool EnableLaLogs = true;
public bool LaLogsUseUtc;
public bool LaLogsUseZForUtc;
Expand Down
4 changes: 2 additions & 2 deletions IO/PathManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ private static string GetSpecialFolderPath()
{
CorrectPathFound = true;

if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
if (OperatingSystem.IsLinux())
return path + Path.DirectorySeparatorChar + ".config" + Path.DirectorySeparatorChar;

if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
if (OperatingSystem.IsWindows())
return path + Path.DirectorySeparatorChar + "AppData" + Path.DirectorySeparatorChar + "Roaming" + Path.DirectorySeparatorChar;

ConsoleUtil.WriteLine("Failed to get special folder path - unsupported platform!", ConsoleColor.Red);
Expand Down
Loading