Suppress update notification when running with --detach#14571
Open
mitchdenny wants to merge 2 commits intorelease/13.2from
Open
Suppress update notification when running with --detach#14571mitchdenny wants to merge 2 commits intorelease/13.2from
mitchdenny wants to merge 2 commits intorelease/13.2from
Conversation
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>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14571Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14571" |
Contributor
There was a problem hiding this comment.
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
_isDetachModefield to track when command is running in detach mode - Overrode
UpdateNotificationsEnabledproperty to returnfalsewhen in detach mode
Contributor
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #22174323147 |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
_isDetachModefield toRunCommandset when--detachflag is parsedUpdateNotificationsEnabledproperty to returnfalsewhen in detach modeAddresses part of #14238