From f612c661feada72c2e8fb1bb8013c3ce95f42bd9 Mon Sep 17 00:00:00 2001 From: Matthias Koch Date: Tue, 9 Jul 2024 02:53:09 +0200 Subject: [PATCH] style --- source/Nuke.Common/Tools/Codecov/CodecovTasks.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source/Nuke.Common/Tools/Codecov/CodecovTasks.cs b/source/Nuke.Common/Tools/Codecov/CodecovTasks.cs index 44c498631..1ca823c87 100644 --- a/source/Nuke.Common/Tools/Codecov/CodecovTasks.cs +++ b/source/Nuke.Common/Tools/Codecov/CodecovTasks.cs @@ -2,6 +2,7 @@ // Distributed under the MIT License. // https://github.com/nuke-build/nuke/blob/master/LICENSE +using System; using Nuke.Common.Tooling; namespace Nuke.Common.Tools.Codecov; @@ -25,10 +26,12 @@ internal static string GetToolPath() private static string GetPackageExecutable() { - if (EnvironmentInfo.IsWin) - return "codecov.exe"; - if (EnvironmentInfo.IsOsx) - return "codecov-macos"; - return "codecov-linux"; + return EnvironmentInfo.Platform switch + { + PlatformFamily.Windows => "codecov.exe", + PlatformFamily.OSX => "codecov-macos", + PlatformFamily.Linux => "codecov-linux", + _ => throw new ArgumentOutOfRangeException() + }; } }