Skip to content

Commit

Permalink
Update ArgumentOutOfRangeException.ThrowIfNullOrWhiteSpace usage in…
Browse files Browse the repository at this point in the history
… `FileUtil` (#933)

Change to Debug.Assert because this is an internal API that is only called with constant strings.
  • Loading branch information
WeihanLi committed Nov 17, 2023
1 parent 8a7b625 commit a7901cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Aspire.Hosting/Utils/FileUtil.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics;

namespace Aspire.Hosting.Utils;

internal static class FileUtil
{
public static string FindFullPathFromPath(string command)
{
ArgumentOutOfRangeException.ThrowIfNullOrWhiteSpace(command, nameof(command));
Debug.Assert(!string.IsNullOrWhiteSpace(command));

if (FileNameSuffixes.CurrentPlatform.Exe != "" && !command.EndsWith(FileNameSuffixes.CurrentPlatform.Exe))
{
Expand Down

0 comments on commit a7901cd

Please sign in to comment.