6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-05 11:23:48 +00:00

Replace path.Join with filepath.Join

Path is for URLs, filepath is for os paths. This solves the problem with wrong repo root on windows.
This commit is contained in:
Grzegorz Dlugoszewski
2020-06-30 11:25:49 +02:00
parent b8606568ef
commit 235ea0d811
4 changed files with 10 additions and 10 deletions

View File

@@ -4,7 +4,7 @@ import (
"git-get/pkg/io"
"git-get/pkg/run"
"git-get/pkg/test"
"path"
"path/filepath"
"testing"
)
@@ -75,7 +75,7 @@ func TestGitConfig(t *testing.T) {
func makeConfigEmpty(t *testing.T) *cfgStub {
c := newCfgStub(t)
io.Write(path.Join(c.repo.Path(), dotgit, "config"), "")
io.Write(filepath.Join(c.repo.Path(), dotgit, "config"), "")
return c
}
@@ -89,7 +89,7 @@ func makeConfigValid(t *testing.T) *cfgStub {
[gitget]
host = github.com
`
io.Write(path.Join(c.repo.Path(), dotgit, "config"), gitconfig)
io.Write(filepath.Join(c.repo.Path(), dotgit, "config"), gitconfig)
return c
}