You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The https://no-color.org/ requires handling empty value in way as if the value was not set.
should check for a NO_COLOR environment variable that, when present and not an empty string (regardless of its value), prevents the addition of ANSI color
I find it a lot better for several reasons.
The problem is that not all languages/OSes/shells are handling an empty value in the same way.
On Windows setting an empty env var is VERY tricky. I suspect 95% of Windows IT users may have real problems doing it. You cannot do it in the command prompt. not via PowerShell, not via GUI. It is possible via Windows Registry or WinAPI, but it is VERY inconvenient and hacky.
Also from a pure usability point of view, echo $SOMEVAR does not allow to distinguish between empty and unset.
Having a different interpretation of an empty and unset environment variable can be seen as a kind of "billion-dollar mistake" 😉
The https://no-color.org/ requires handling empty value in way as if the value was not set.
I find it a lot better for several reasons.
The problem is that not all languages/OSes/shells are handling an empty value in the same way.
In .NET (C# etc) setting an empty value unsets the environmental variable (sic!). See: https://docs.microsoft.com/en-us/dotnet/api/system.environment.setenvironmentvariable?view=net-5.0
On Windows setting an empty env var is VERY tricky. I suspect 95% of Windows IT users may have real problems doing it. You cannot do it in the command prompt. not via PowerShell, not via GUI. It is possible via Windows Registry or WinAPI, but it is VERY inconvenient and hacky.
Also from a pure usability point of view,
echo $SOMEVAR
does not allow to distinguish between empty and unset.Having a different interpretation of an empty and unset environment variable can be seen as a kind of "billion-dollar mistake" 😉
Reference: https://unix.stackexchange.com/questions/27708/is-there-a-difference-between-setting-an-environment-variable-to-the-empty-strin
At last, many software see empty env vars as though as it they are not set e.g. https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#parsing-empty-value
The text was updated successfully, but these errors were encountered: