Unverified Commit 0a872862 by Edward Thomson Committed by GitHub

Merge pull request #6063 from libgit2/ethomson/win32_envvar

win32: allow empty environment variables
parents 1396a9b5 18fc751e
......@@ -755,7 +755,7 @@ int git__getenv(git_buf *out, const char *name)
if (value_len)
error = git_buf_put_w(out, wide_value, value_len);
else if (GetLastError() == ERROR_ENVVAR_NOT_FOUND)
else if (GetLastError() == ERROR_SUCCESS || GetLastError() == ERROR_ENVVAR_NOT_FOUND)
error = GIT_ENOTFOUND;
else
git_error_set(GIT_ERROR_OS, "could not read environment variable '%s'", name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment