Allow parse boolean value '0' and '1' from environment variable
Open
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 890
- Avg merge
- 2h 11m
- Merged PRs (30d)
- 10
Description
**Describe the bug**
If an environment variable was set as e.g. "1" this is not parsable.
**To Reproduce**
Try this [parse logic](https://github.com/dotnet/docfx/blob/b3415958c6d7ef3b107c91043591880fe03dd827/src/Docfx.DataContracts.Common/Constants.cs#L150) with different values e.g. "1", "true" in a simple .NET 9 console app.
**Expected behavior**
The values '0' and '1' can also be used in environment variables to make it more secure.
**Context (please complete the following information):**
OS: Windows
Docfx version: 2.78.3
.NET version: .NET 9.0
Contributor guide
Assessment
This issue has not been assessed yet.