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