Skip to content

Commit

Permalink
Fix wrong argument order on ArgumentExceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
johanndev authored and RehanSaeed committed Oct 4, 2021
1 parent d2e6932 commit 01dc955
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Boxed.DotnetNewTest/DotnetNew.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static Task InstallAsync(Assembly assembly, string fileName)

if (fileName.Length == 0)
{
throw new ArgumentException(nameof(fileName), $"{nameof(fileName)} must not be empty.");
throw new ArgumentException($"{nameof(fileName)} must not be empty.", nameof(fileName));
}

var projectFilePath = GetProjectFilePath(assembly, fileName);
Expand All @@ -75,7 +75,7 @@ public static async Task InstallAsync(string source, TimeSpan? timeout = null, b

if (source.Length == 0)
{
throw new ArgumentException(nameof(source), $"{nameof(source)} must not be empty.");
throw new ArgumentException($"{nameof(source)} must not be empty.", nameof(source));
}

await RunDotnetCommandAsync($"new --install \"{source}\"", timeout, showShellWindow).ConfigureAwait(false);
Expand Down Expand Up @@ -127,7 +127,7 @@ public static Task UninstallAsync(Assembly assembly, string fileName)

if (fileName.Length == 0)
{
throw new ArgumentException(nameof(fileName), $"{nameof(fileName)} must not be empty.");
throw new ArgumentException( $"{nameof(fileName)} must not be empty.", nameof(fileName));
}

var projectFilePath = GetProjectFilePath(assembly, fileName);
Expand All @@ -153,7 +153,7 @@ public static async Task UninstallAsync(string source, TimeSpan? timeout = null,

if (source.Length == 0)
{
throw new ArgumentException(nameof(source), $"{nameof(source)} must not be empty.");
throw new ArgumentException($"{nameof(source)} must not be empty.", nameof(source));
}

await RunDotnetCommandAsync($"new --uninstall \"{source}\"", timeout, showShellWindow).ConfigureAwait(false);
Expand Down

0 comments on commit 01dc955

Please sign in to comment.