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
In order to provide a consistent experience integrating with boolean environment variables we should export a envVarToBoolean helper modeled after the one exported in
Ignore the cache section, it's not needed as node will cache the env vars anyway
Allow any string, not just the known strings
"false" and "0" should translate to boolean false
> Boolean("false")
false> Boolean("0")
false
Original text from PR:
I am not sure if we export a "envVarToBoolean" helper, but if not I should make an issue to export one from core-util. This is probably fine for now? Up to you (and your team)!
In order to provide a consistent experience integrating with boolean environment variables we should export a
envVarToBoolean
helper modeled after the one exported inazure-sdk-for-js/sdk/instrumentation/opentelemetry-instrumentation-azure-sdk/src/configuration.ts
Lines 26 to 39 in 6a8dd2c
Notes:
known
stringsOriginal text from PR:
I am not sure if we export a "envVarToBoolean" helper, but if not I should make an issue to export one from core-util. This is probably fine for now? Up to you (and your team)!
Originally posted by @maorleger in #31160 (comment)
The text was updated successfully, but these errors were encountered: