Skip to content

astro org switch still prompts for workspace selection when --workspace-id flag is provided #1962

@dsgupta02

Description

@dsgupta02

Describe the bug

When using the --workspace-id flag with the astro org switch command for non-interactive switching, the CLI still prompts for workspace selection if the organization is being switched at the same time.
However, when the organization is already selected, the command behaves as expected and does not prompt for workspace selection.

What CLI Version did you experience this bug?

Astro CLI Version: 1.37.0

This CLI bug is related to which Astronomer Platform?

Astro

What Operating System is the above CLI installed on?

🪜 Steps To Reproduce

  1. Switching org and workspace together
    astro org switch Astronomer --workspace-id="clv2vqrpd000a01ldnkcdpnb8"
    Observed behavior:
    The CLI still prompts for workspace selection, even though the --workspace-id flag is provided.
    Expected behavior:
    When the --workspace-id flag is specified, the CLI should not prompt for workspace selection — it should switch both org and workspace non-interactively.

📸 Screenshots

Image

Metadata

Metadata

Labels

from_qaIssues Reported by QA or Automation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions