https://issues.dlang.org/show_bug.cgi?id=16337

          Issue ID: 16337
           Summary: Posix get empty environment value returns null
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: pull
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: [email protected]
          Reporter: [email protected]

If one saves an environment variable that is a blank string, and then retrieves
that value, the returned value is the null string.

While this normally would be fine (null is a valid blank string), the get
function uses null as a sentinel to signify that the environment variable isn't
present. This means one cannot distinguish between getting an environment
variable that is blank, and one that is missing.

PR: https://github.com/dlang/phobos/pull/4627

--

Reply via email to