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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user