Skip to content

Commit 9f09f29

Browse files
committed
sysdir: don't guess the paths again when $PATH is specified
We should replace it with whatever the user set, not start again.
1 parent 410855f commit 9f09f29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sysdir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ int git_sysdir_set(git_sysdir_t which, const char *search_path)
171171
expand_path = strstr(search_path, PATH_MAGIC);
172172

173173
/* reset the default if this path has been cleared */
174-
if (!search_path || expand_path)
174+
if (!search_path)
175175
git_sysdir__dirs[which].guess(&git_sysdir__dirs[which].buf);
176176

177177
/* if $PATH is not referenced, then just set the path */

0 commit comments

Comments
 (0)