Skip to content

[Bug]: DAB init doesn't honor DAB_ENVIRONMENT variable #1527

@abhishekkumams

Description

@abhishekkumams

What happened?

when dab init is called with environment variable DAB_ENVIRONMENT=Development. It should create a file with name dab-config.Development.json. Currently, it's only creating file dab-config.json

Although it does error out if dab-config.Development.json is already present, but if not present it should create this file.
image

Version

running from main

What database are you using?

Azure SQL

What hosting model are you using?

Local (including CLI)

Which API approach are you accessing DAB through?

No response

Relevant log output

PS C:\myDir\dab-testing\latest-test> dab init --database-type mssql
Information: Microsoft.DataApiBuilder 1.0.0+e1bf19cc334b19534a30ab5f70274bba4bd81e24
Information: Config not provided. Trying to get default config based on DAB_ENVIRONMENT...
Information: Environment variable DAB_ENVIRONMENT is Development
Unable to find config file: dab-config.Development.json does not exist.
Found config file: dab-config.json.
Error: Config file: dab-config.json already exists. Please provide a different name or remove the existing config file.
Error: Could not generate config file.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Labels

bugSomething isn't workingtriageissues to be triaged

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions