Used .gitconfig in LocalWorkingDir instead of PWD
This commit is contained in:
parent
6e0e7ab946
commit
67c3484b05
@ -93,8 +93,8 @@ func (c *gitConfig) List() (string, error) {
|
||||
}
|
||||
|
||||
// ListFromFile lists all of the git config values in the given config file
|
||||
func (c *gitConfig) ListFromFile() (string, error) {
|
||||
return simpleExec(nil, "git", "config", "-l", "-f", ".gitconfig")
|
||||
func (c *gitConfig) ListFromFile(f string) (string, error) {
|
||||
return simpleExec(nil, "git", "config", "-l", "-f", f)
|
||||
}
|
||||
|
||||
// Version returns the git version
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -183,7 +184,8 @@ func (c *Configuration) loadGitConfig() {
|
||||
panic(fmt.Errorf("Error listing git config: %s", err))
|
||||
}
|
||||
|
||||
fileOutput, err := git.Config.ListFromFile()
|
||||
configFile := filepath.Join(LocalWorkingDir, ".gitconfig")
|
||||
fileOutput, err := git.Config.ListFromFile(configFile)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("Error listing git config from file: %s", err))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user