forked from coop-cloud/abra
fix: join path correctly
This commit is contained in:
parent
870c561fee
commit
665396b679
|
@ -2,6 +2,7 @@ package git
|
|||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/user"
|
||||
"path"
|
||||
"path/filepath"
|
||||
|
@ -93,7 +94,13 @@ func parseGitConfig() (*gitConfigPkg.Config, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
b, err := ioutil.ReadFile(usr.HomeDir + "/.gitconfig")
|
||||
globalGitConfig := filepath.Join(usr.HomeDir, ".gitconfig")
|
||||
if _, err := os.Stat(globalGitConfig); os.IsNotExist(err) {
|
||||
logrus.Debugf("no %s exists, not reading any global git ignore config", globalGitConfig)
|
||||
return cfg, nil
|
||||
}
|
||||
|
||||
b, err := ioutil.ReadFile(globalGitConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue