Skip to content

azd down prompts init steps when running in a directory without a .azure file #2020

Description

@Austinauth

Output from azd version
Run azd version and copy and paste the output here: azd version 0.8.0-beta.2 (commit 429b6cc)

Describe the bug
Running azd down in a directory with no .azure file prompts the user input an environment name, subscription and location before attempting to delete the resources from azure.

To Reproduce

Run azd down in a directory with no .azure file, but containing other template files.
MicrosoftTeams-image (3)

MicrosoftTeams-image (4)

Expected behavior
In this scenario we should probably show the user an error message in this scenario and not prompt them to enter the env, location, and sub. 

Additional context

  • I ran azd down in a directory I had previously ran azd init in
  • I did not complete the init originally, hence the reason there are some azd files in the directory, but not the .azure file
  • I ran azd down in this directory because I wasn't sure if I had deployed to Azure and wanted to be safe and delete any resources if I had.

Metadata

Metadata

Labels

area/core-cliCLI commands, cmd/, internal/cmd/area/error-handlingError suggestions, error frameworkbugSomething isn't working

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions