From 78cb933898e024d9e8ff5d3ed40bdba0e04af679 Mon Sep 17 00:00:00 2001 From: Th1nkMore <12010620@mail.sustech.edu.cn> Date: Thu, 24 Nov 2022 09:25:07 +0800 Subject: [PATCH] small bug fixed --- server/server.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/server.go b/server/server.go index 950ce09..a899331 100644 --- a/server/server.go +++ b/server/server.go @@ -145,12 +145,13 @@ func serviceRpc(hr HandlerReq) { args := []string{rpc, "--stateless-rpc", dir} cmd := exec.Command(DefaultConfig.GitBinPath, args...) version := r.Header.Get("Git-Protocol") + + cmd.Dir = dir + cmd.Env = env if len(version) != 0 { cmd.Env = append(env, fmt.Sprintf("GIT_PROTOCOL=%s", version)) } - cmd.Dir = dir - cmd.Env = env - + DefaultConfig.CommandFunc(cmd) in, err := cmd.StdinPipe()