An environment variable can be in one of three states:
- undefined.
- defined with a non-empty value.
- defined but with an empty value.
The windows implementation did not support case 3 (it was not handling errors). The Linux implementation is already correct.