diff options
-rw-r--r-- | src/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c index c7af2961a..9b0c45ce8 100644 --- a/src/util.c +++ b/src/util.c @@ -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); |