workaround

This commit is contained in:
Songmu 2019-05-07 03:29:42 +09:00
parent 569a8fed88
commit 9d4863bb5b

View file

@ -119,7 +119,9 @@ func (g *getter) getRemoteRepository(remote RemoteRepository) error {
if vcs == nil {
return fmt.Errorf("Could not find version control system: %s", remoteURL)
}
repoPath = strings.TrimSuffix(filepath.Join(root, repoURL.Host, repoURL.Path), ".git")
if strings.HasPrefix(remoteURL.String(), strings.TrimSuffix(repoURL.String(), ".git")) {
repoPath = strings.TrimSuffix(filepath.Join(root, repoURL.Host, repoURL.Path), ".git")
}
}
if getRepoLock(repoPath) {
return vcs.Clone(repoURL, repoPath, g.shallow, g.silent)