Skip to content

Commit b8c8b47

Browse files
danmoseleygithub-actions
authored andcommitted
Fix AE in ExecutableResource
not tests
1 parent 6734e95 commit b8c8b47

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Aspire.Hosting/ApplicationModel/ExecutableResource.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Aspire.Hosting.ApplicationModel;
1111
/// </summary>
1212
/// <param name="name">The name of the resource.</param>
1313
/// <param name="command">The command to execute.</param>
14-
/// <param name="workingDirectory">The working directory of the executable.</param>
14+
/// <param name="workingDirectory">The working directory of the executable. Can be empty.</param>
1515
public class ExecutableResource(string name, string command, string workingDirectory)
1616
: Resource(name), IResourceWithEnvironment, IResourceWithArgs, IResourceWithEndpoints, IResourceWithWaitSupport
1717
{
@@ -23,7 +23,7 @@ public class ExecutableResource(string name, string command, string workingDirec
2323
/// <summary>
2424
/// Gets the working directory for the executable resource.
2525
/// </summary>
26-
public string WorkingDirectory { get; } = ThrowIfNullOrEmpty(workingDirectory);
26+
public string WorkingDirectory { get; } = workingDirectory ?? throw new ArgumentNullException(nameof(workingDirectory));
2727

2828
private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
2929
{

tests/Aspire.Hosting.Tests/ExecutableResourceTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace Aspire.Hosting.Tests;
1010

1111
public class ExecutableResourceTests
1212
{
13-
// comment to trigger build
1413
[Fact]
1514
public async Task AddExecutableWithArgs()
1615
{

0 commit comments

Comments
 (0)