Browse Source

fix origin too long

tags/v1.21.8^2
lewis 4 years ago
parent
commit
e245549492
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      routers/repo/cloudbrain.go

+ 1
- 1
routers/repo/cloudbrain.go View File

@@ -526,7 +526,7 @@ func downloadCode(repo *models.Repository, codePath string) error {
if strings.Contains(line, "url") && strings.Contains(line, ".git"){
originUrl := "\turl = " + repo.CloneLink().HTTPS + "\n"
if len(line) > len(originUrl) {
originUrl += strings.Repeat( "\t", len(line) - len(originUrl))
originUrl += strings.Repeat( " ", len(line) - len(originUrl))
}
bytes := []byte(originUrl)
_, err := configFile.WriteAt(bytes, pos)


Loading…
Cancel
Save