Skip to content

Commit

Permalink
Revert "win/os_env_exists(): workaround libuv bug neovim#10734"
Browse files Browse the repository at this point in the history
This reverts commit 278c5d4.
  • Loading branch information
blueyed committed Sep 25, 2019
1 parent 227ef71 commit bb6b126
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions src/nvim/os/env.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions test/functional/eval/environ_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down

0 comments on commit bb6b126

Please sign in to comment.