dotnet / dotnet/docfx

Allow parse boolean value '0' and '1' from environment variable

Open
#10,725 1 comment 0 reactions 0 assignees View on GitHub
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

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.