aboutsummaryrefslogtreecommitdiffstats
path: root/config/config.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2021-05-02 23:40:08 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2021-05-02 23:40:08 +0200
commit01df7536992af375a54bbedf45369a475953e372 (patch)
tree8435050f4388f15b3a85d135a3f7d11b1ff61540 /config/config.go
parent67af9d7223b0cc643025d958c592291f7475ac75 (diff)
downloadgo-git-01df7536992af375a54bbedf45369a475953e372.tar.gz
*: use go-billy instead of os calls
Diffstat (limited to 'config/config.go')
-rw-r--r--config/config.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/config.go b/config/config.go
index 1f737b5..1aee25a 100644
--- a/config/config.go
+++ b/config/config.go
@@ -12,6 +12,7 @@ import (
"sort"
"strconv"
+ "github.com/go-git/go-billy/v5/osfs"
"github.com/go-git/go-git/v5/internal/url"
format "github.com/go-git/go-git/v5/plumbing/format/config"
"github.com/mitchellh/go-homedir"
@@ -158,7 +159,7 @@ func LoadConfig(scope Scope) (*Config, error) {
}
for _, file := range files {
- f, err := os.Open(file)
+ f, err := osfs.Default.Open(file)
if err != nil {
if os.IsNotExist(err) {
continue