Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Jul 9, 2024
1 parent 3440454 commit f612c66
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions source/Nuke.Common/Tools/Codecov/CodecovTasks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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()
};
}
}

0 comments on commit f612c66

Please sign in to comment.