Skip to content

Suppress update notification when running with --detach#14571

Open
mitchdenny wants to merge 2 commits intorelease/13.2from
fix/suppress-update-notification-in-detach-mode
Open

Suppress update notification when running with --detach#14571
mitchdenny wants to merge 2 commits intorelease/13.2from
fix/suppress-update-notification-in-detach-mode

Conversation

@mitchdenny
Copy link
Member

Summary

When running aspire run --detach, the parent process no longer displays the update notification message before exiting. The update check is not useful in detach mode since the parent exits immediately after spawning the child process.

Changes

  • Added _isDetachMode field to RunCommand set when --detach flag is parsed
  • Overrode UpdateNotificationsEnabled property to return false when in detach mode

Addresses part of #14238

When running 'aspire run --detach', the parent process no longer
displays the update notification message before exiting. The update
check is not useful in detach mode since the parent exits immediately
after spawning the child process.

Fixes part of #14238

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 19, 2026 07:22
@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

🚀 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/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14571

Or

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request suppresses update notifications when running aspire run --detach. The change ensures that when the CLI is detached (parent process exits immediately after spawning child), update notifications are not displayed since they would not be useful or visible to users.

Changes:

  • Added _isDetachMode field to track when command is running in detach mode
  • Overrode UpdateNotificationsEnabled property to return false when in detach mode

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit 13b1216:

Test Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
ResourcesCommandShowsRunningResources ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording

📹 Recordings uploaded automatically from CI run #22174323147

@mitchdenny mitchdenny linked an issue Feb 19, 2026 that may be closed by this pull request
Validates that the update notification is not shown when --detach is
used, and that it is shown for normal (non-detach) runs. Uses a
tracking ICliUpdateNotifier to verify the behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI commands suggestions

1 participant

Comments