Skip to content

[Dashboard] Explicit dashboard run options should override environment values #19779

Description

Is there an existing issue for this?

  • I have searched the existing issues

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

  1. Set ASPIRE_DASHBOARD_PERSISTENCE_MODE=Run.
  2. Run aspire dashboard run --persistence None.
  3. Inspect the child Dashboard arguments or resulting storage mode.
  4. 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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions