Skip to content

Fix aspire agent init --non-interactive with multiple AppHosts - #22320

Merged
Ella Hathaway (ellahathaway) merged 2 commits into
mainfrom
backport/pr-22269-to-main
Nov 16, 2026
Merged

Ella Hathaway (ellahathaway) merged 2 commits into
mainfrom
backport/pr-22269-to-main

Conversation

@aspire-repo-bot

@aspire-repo-bot aspire-repo-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #16264

Backport of #22269 to main

/cc Ella Hathaway (@ellahathaway)

When no AppHost is saved in settings and several AppHosts exist under the
working directory, agent init prompted for a selection even in
non-interactive mode, which threw. Fall back to the working directory for
skill-source settings instead, matching the no-AppHost case.

Co-authored-by: Copilot App <[email protected]>
Assert success and multi-AppHost discovery instead of snapshotting generated config.

Co-authored-by: Copilot App <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22320

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22320"

@ellahathaway Ella Hathaway (ellahathaway) changed the title [main] [release/17.0] Fix aspire agent init --non-interactive with multiple AppHosts Fix aspire agent init --non-interactive with multiple AppHosts Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

2 / 101 PR test projects · 4 PR jobs, from 2 changed files.

Selected PR test projects (2 / 101)

Aspire.Cli.EndToEnd.Tests, Aspire.Cli.Tests

Selected PR jobs (4)

cli-starter-validation, extension-e2e, polyglot, typescript-api-compat


How these were chosen — grouped by what changed

📦 affected project Aspire.Cli
→ 1 test: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.Tests/Commands/AgentInitCommandTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

Job reasons

Job Triggered by
cli-starter-validation affected project Aspire.Cli
extension-e2e • src/Aspire.Cli/Commands/AgentInitCommand.cs
• affected project Aspire.Cli
polyglot affected project Aspire.Cli
typescript-api-compat affected project Aspire.Cli

Selection computed for commit 2d88de6.

@ellahathaway
Ella Hathaway (ellahathaway) merged commit e870a4c into main Nov 16, 2026
224 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.1 milestone Nov 16, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

✅ No documentation update needed.

excluded → head_branch_is_backport, body_backport_marker. The PR is a backport of #22269 to main, so docs belong with the original PR. Triggered signals: cli_command_file_changed (src/Aspire.Cli/Commands/AgentInitCommand.cs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't run aspire agent init non interactively

1 participant