Is there an existing issue for this?
Describe the bug
DashboardRunCommand.AddStringOptionArg checks whether the mapped environment setting exists before reading an explicitly supplied CLI option. If it exists, --persistence or --application-name is not forwarded to the Dashboard, so the inherited environment value wins.
This can persist data despite an explicit --persistence None, or select a different Resume database than the application name supplied on the command line.
Expected Behavior
Explicit CLI options should take precedence over inherited environment values.
Steps To Reproduce
- Set
ASPIRE_DASHBOARD_PERSISTENCE_MODE=Run.
- Run
aspire dashboard run --persistence None.
- Inspect the child Dashboard arguments or resulting storage mode.
- The environment value is used instead of the explicit CLI value.
Exceptions (if any)
N/A
Aspire doctor output
Aspire CLI 13.6.0-pr.18924.g5ee63941
Windows 10.0.26200 and Ubuntu 24.04.3
Anything else?
Related to #18924. Source: src/Aspire.Cli/Commands/DashboardRunCommand.cs:181-216,244-269. The same implementation remains on current main.
Is there an existing issue for this?
Describe the bug
DashboardRunCommand.AddStringOptionArgchecks whether the mapped environment setting exists before reading an explicitly supplied CLI option. If it exists,--persistenceor--application-nameis not forwarded to the Dashboard, so the inherited environment value wins.This can persist data despite an explicit
--persistence None, or select a differentResumedatabase than the application name supplied on the command line.Expected Behavior
Explicit CLI options should take precedence over inherited environment values.
Steps To Reproduce
ASPIRE_DASHBOARD_PERSISTENCE_MODE=Run.aspire dashboard run --persistence None.Exceptions (if any)
N/A
Aspire doctor output
Anything else?
Related to #18924. Source:
src/Aspire.Cli/Commands/DashboardRunCommand.cs:181-216,244-269. The same implementation remains on currentmain.