Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Aspire.Cli/Commands/RunCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected override async Task<int> ExecuteAsync(ParseResult parseResult, Cancell
var pendingRun = _runner.RunAsync(
effectiveAppHostProjectFile,
watch,
true,
!watch, // If we aren't in watch mode we can no-build here, but watch doesn't support no-build.
Array.Empty<string>(),
env,
backchannelCompletitionSource,
Expand Down
4 changes: 3 additions & 1 deletion src/Aspire.Cli/DotNetCliRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ public async Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild,

if (watch && noBuild)
{
throw new InvalidOperationException("Cannot use --watch and --no-build at the same time.");
var ex = new InvalidOperationException("Cannot use --watch and --no-build at the same time.");
backchannelCompletionSource?.SetException(ex);
throw ex;
}

var watchOrRunCommand = watch ? "watch" : "run";
Expand Down
Loading