diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | exec_cmd.c | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -1315,7 +1315,7 @@ remove-dashes: ### Installation rules ifeq ($(firstword $(subst /, ,$(template_dir))),..) -template_instdir = $(gitexecdir)/$(template_dir) +template_instdir = $(bindir)/$(template_dir) else template_instdir = $(template_dir) endif diff --git a/exec_cmd.c b/exec_cmd.c index dedb01da6f..45f92eb164 100644 --- a/exec_cmd.c +++ b/exec_cmd.c @@ -43,9 +43,9 @@ static const char *builtin_exec_path(void) const char *system_path(const char *path) { - if (!is_absolute_path(path)) { + if (!is_absolute_path(path) && argv0_path) { struct strbuf d = STRBUF_INIT; - strbuf_addf(&d, "%s/%s", git_exec_path(), path); + strbuf_addf(&d, "%s/%s", argv0_path, path); path = strbuf_detach(&d, NULL); } return path; |