Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions src/Aspire.Cli/Projects/GuestAppHostProject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ await GenerateCodeViaRpcAsync(
cancellationToken);

// Step 5: Install dependencies using GuestRuntime (best effort - don't block code generation)
await InstallDependenciesAsync(directory, rpcClient, cancellationToken);
return true;
var result = await InstallDependenciesAsync(directory, rpcClient, cancellationToken);
return (result == 0);
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ private async Task<TemplateResult> ApplyTypeScriptStarterTemplateAsync(CallbackT
if (appHostProject is not IGuestAppHostSdkGenerator guestProject)
{
_interactionService.DisplayError("Automatic 'aspire restore' is unavailable for the new TypeScript starter project because no TypeScript AppHost SDK generator was found.");
if (Directory.Exists(outputPath))
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I’m considering: if the output directory already exists, we shouldn’t delete it on restore failure.
I can update the PR to only delete directories created by the template.
Let me know if you prefer that approach.

{
Directory.Delete(outputPath, true);
}
return new TemplateResult(ExitCodeConstants.FailedToBuildArtifacts, outputPath);
}

Expand Down
Loading