aboutsummaryrefslogtreecommitdiff
path: root/exec_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'exec_cmd.c')
-rw-r--r--exec_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/exec_cmd.c b/exec_cmd.c
index dedb01da6..45f92eb16 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;