Skip to content

[Issue] azd up ignores --environment if default environment is missing #4411

Open
@paulbatum

Description

Output from azd version
azd version 1.10.1 (commit 31409a3)

Describe the bug
If config.json refers to a default environment that no longer exists (lets call it foo), running azd up --environment bar will ignore the specified env and instead prompt you Environment 'foo' does not exist, would you like to create it? (Y/n)

To Reproduce
mkdir azdtest
cd azdtest
azd init -t hello-azd -e bar
azd env new foo
rd -r ..azure\foo
azd up -e bar

Expected behavior
It runs on azd up on environment bar

Actual behavior
It displays the following prompt:
Environment 'foo' does not exist, would you like to create it? (Y/n)

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions