diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-08-10 11:48:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-10 11:48:36 +0200 |
commit | 278c5d452c2cbc436a9cc317407ae6021a226c3a (patch) | |
tree | 2fb77b3b6ef1cdf3bedf59787dfe1ff201a849c9 /src | |
parent | 0062c65ba8eec61df80caa99de7ed148e863fbdb (diff) | |
download | rneovim-278c5d452c2cbc436a9cc317407ae6021a226c3a.tar.gz rneovim-278c5d452c2cbc436a9cc317407ae6021a226c3a.tar.bz2 rneovim-278c5d452c2cbc436a9cc317407ae6021a226c3a.zip |
win/os_env_exists(): workaround libuv bug #10734
os_env_exists() fails on MSVC build:
os_env_exists:104: uv_os_getenv(EMPTY_VAR) failed: -4094 UNKNOWN
- Revert 396a3945c4eba733b3a99a7ded217af83a400791
- HACK: Windows: return TRUE if uv_os_getenv() returns UV_UNKNOWN, until
libuv bug is fixed: https://github.com/libuv/libuv/issues/2413
ref https://github.com/neovim/neovim/commit/396a3945c4eba733b3a99a7ded217af83a400791#r34642361
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/os/env.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c index bef78d8cc8..0ee21480cb 100644 --- a/src/nvim/os/env.c +++ b/src/nvim/os/env.c @@ -102,6 +102,9 @@ 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); } |