diff --git a/MinVerTests.Infra/CommandExtensions.cs b/MinVerTests.Infra/CliWrapExtensions.cs similarity index 88% rename from MinVerTests.Infra/CommandExtensions.cs rename to MinVerTests.Infra/CliWrapExtensions.cs index 8c9edb11..2b1a8303 100644 --- a/MinVerTests.Infra/CommandExtensions.cs +++ b/MinVerTests.Infra/CliWrapExtensions.cs @@ -11,7 +11,7 @@ namespace MinVerTests.Infra { - internal static class CommandExtensions + internal static class CliWrapExtensions { private static int index; @@ -21,7 +21,7 @@ public static async Task ExecuteBufferedLoggedAsync(this var result = await command.WithValidation(CommandResultValidation.None).ExecuteBufferedAsync(); - var index = Interlocked.Increment(ref CommandExtensions.index); + var index = Interlocked.Increment(ref CliWrapExtensions.index); var log = $@" @@ -77,7 +77,7 @@ public static EnvironmentVariablesBuilder SetFrom(this EnvironmentVariablesBuild return env; } - public static ArgumentsBuilder AddIf(this ArgumentsBuilder args, string value, bool condition) + public static ArgumentsBuilder AddIf(this ArgumentsBuilder args, bool condition, string value) { if (condition) { diff --git a/MinVerTests.Infra/Git.cs b/MinVerTests.Infra/Git.cs index 08b1f1cc..6bd36d3b 100644 --- a/MinVerTests.Infra/Git.cs +++ b/MinVerTests.Infra/Git.cs @@ -35,7 +35,7 @@ await Cli.Wrap("git") .WithArguments("log --graph --pretty=format:'%d'") .WithWorkingDirectory(path) .ExecuteBufferedAsync() - .Select(r => r.StandardOutput); + .Select(result => result.StandardOutput); public static Task Tag(string path, string tag) => Cli.Wrap("git").WithArguments($"tag {tag}").WithWorkingDirectory(path).ExecuteAsync(); diff --git a/MinVerTests.Infra/Sdk.cs b/MinVerTests.Infra/Sdk.cs index 8f787fd7..b049f1ea 100644 --- a/MinVerTests.Infra/Sdk.cs +++ b/MinVerTests.Infra/Sdk.cs @@ -121,7 +121,7 @@ private static void CreateGlobalJsonIfRequired(string path) .WithArguments(args => args .Add("build") .Add("--no-restore") - .AddIf("--nologo", !(Version?.StartsWith("2.", StringComparison.Ordinal) ?? false)) + .AddIf(!(Version?.StartsWith("2.", StringComparison.Ordinal) ?? false), "--nologo") ) .WithEnvironmentVariables(env => env .SetFrom(environmentVariables)