envShadowingNote function

String? envShadowingNote(
  1. String keyName,
  2. String? envValue,
  3. String? storedValue
)

The provenance note for a shadowed slot (null when the env value is absent, empty, or agrees with the store): names the variable and the provenance order. Callers style it (note: …) for their surface.

Implementation

String? envShadowingNote(
  String keyName,
  String? envValue,
  String? storedValue,
) => envShadowsStoredKey(envValue, storedValue)
    ? 'the environment variable $keyName shadows a DIFFERENT '
          'stored key — the env value is the one sent'
    : null;