Azure / Azure/azure-dev

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

Open
#2,020 1 comment 1 reaction 2 assignees Claimed by @vhvb1989 View on GitHub
area/core-cli area/error-handling bug
Dominant language
Go
Stars
569
Forks
364
Avg merge
2d 19h
Merged PRs (30d)
136

Description

- [x] Make sure you've installed the latest version using [instructions in the wiki](../wiki/install)

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

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.