Fix system tests

This commit is contained in:
Lorenzo Bolla
2021-09-21 18:52:43 +02:00
parent ff51c46915
commit 787cc8e3ee
51 changed files with 607 additions and 66 deletions

View File

@@ -224,10 +224,8 @@ func (context *AptlyContext) newDownloader(progress aptly.Progress) aptly.Downlo
maxTries := context.config().DownloadRetries + 1
maxTriesFlag := context.flags.Lookup("max-tries")
if maxTriesFlag != nil {
maxTriesFlagValue := maxTriesFlag.Value.Get().(int)
if maxTriesFlagValue > maxTries {
maxTries = maxTriesFlagValue
}
// If flag is defined prefer it to global setting
maxTries = maxTriesFlag.Value.Get().(int)
}
return http.NewDownloader(downloadLimit*1024, maxTries, progress)
}