1
0
Fork 0
forked from forgejo/forgejo

Pre-calculate the absolute path of git (#6575)

* Pre-caculate the absolute path of git

* Do not repeat string literals which has been defined somewhere

Also make it flexible to accept customized/user-defined value.
This commit is contained in:
Mura Li 2019-04-17 19:11:37 +08:00 committed by Lauris BH
parent 7a4c29c739
commit 2a9806bfc6
2 changed files with 12 additions and 1 deletions

View file

@ -41,7 +41,7 @@ func NewCommand(args ...string) *Command {
cargs := make([]string, len(GlobalCommandArgs))
copy(cargs, GlobalCommandArgs)
return &Command{
name: "git",
name: GitExecutable,
args: append(cargs, args...),
}
}