Revert "win/os_env_exists(): workaround libuv bug #10734"

This reverts commit 278c5d452c.
This commit is contained in:
Daniel Hahler 2019-09-11 13:48:09 +02:00
parent 227ef71621
commit bb6b1267e7
2 changed files with 1 additions and 3 deletions

View File

@ -102,9 +102,6 @@ bool os_env_exists(const char *name)
assert(r != UV_EINVAL);
if (r != 0 && r != UV_ENOENT && r != UV_ENOBUFS) {
ELOG("uv_os_getenv(%s) failed: %d %s", name, r, uv_err_name(r));
#ifdef WIN32
return (r == UV_UNKNOWN);
#endif
}
return (r == 0 || r == UV_ENOBUFS);
}

View File

@ -10,6 +10,7 @@ describe('environment variables', function()
eq("", environ()['EMPTY_VAR'])
eq(nil, environ()['DOES_NOT_EXIST'])
end)
it('exists() handles empty env variable', function()
clear({env={EMPTY_VAR=""}})
eq(1, exists('$EMPTY_VAR'))