[Bug]: `DAB_ENVIRONMENT` env var set with `folder/dab-config.json` is processed incorrectly
What happened?
A bug happened!
FileSystemRuntimeConfigLoader::GetFileName(string? environmentValue, bool considerOverrides)
does not generate a correct file name/path when the input arg environmentValue is something like folder/dab-config.json
Here are the var values as shown in the debugger:
Version
1.2
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
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
I don't see this as a bug. The ENV variable is supposed to contain the Environment name such as Development, Prod, etc. Providing a file path is incorrect and should be treated as a user error.
We can improve our doc to be more specific like:
### ENV Variable
The `ENV` variable is used to determine the environment-specific configuration file. The file name is constructed as `abc.{ENV}.json`.
### Expected Values
The `ENV` variable should contain only valid environment names. Examples of valid environment names include:
- `prod`
- `dev`
- `staging`
- `prod1`
### Validation Rules
1. The `ENV` variable must only contain alphanumeric characters and dots (`.`).
2. The `ENV` variable must not include the file extension (e.g., `.json`).
### Examples
#### Valid Values
- `ENV=prod` results in `abc.prod.json`
- `ENV=dev` results in `abc.dev.json`
- `ENV=staging` results in `abc.staging.json`
What scenario would ever create this json.json part though?
What scenario would ever create this
json.jsonpart though?
if DAB_ENV = Config/dab-config-bigdog.json it will lead to the corresponding scenario.
