We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1396a9b + 18fc751 commit 0a87286Copy full SHA for 0a87286
src/util.c
@@ -755,7 +755,7 @@ int git__getenv(git_buf *out, const char *name)
755
756
if (value_len)
757
error = git_buf_put_w(out, wide_value, value_len);
758
- else if (GetLastError() == ERROR_ENVVAR_NOT_FOUND)
+ else if (GetLastError() == ERROR_SUCCESS || GetLastError() == ERROR_ENVVAR_NOT_FOUND)
759
error = GIT_ENOTFOUND;
760
else
761
git_error_set(GIT_ERROR_OS, "could not read environment variable '%s'", name);
0 commit comments