mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 16:07:12 -07:00
Better display.
This commit is contained in:
parent
814777e553
commit
806628be4a
1 changed files with 4 additions and 2 deletions
|
@ -140,15 +140,17 @@ public class JCenterApi @Inject constructor (@Nullable @Assisted("username") val
|
|||
+ if (fileCount > 1) "..." else "")
|
||||
var i = 1
|
||||
val errorMessages = arrayListOf<String>()
|
||||
var dots = ""
|
||||
filesToUpload.forEach { file ->
|
||||
http.uploadFile(username, password, fileToPath(file) + optionPath, file,
|
||||
{ },
|
||||
{ r: Response -> dots += "."},
|
||||
{ r: Response ->
|
||||
dots += "X"
|
||||
val jo = parseResponse(r.body().string())
|
||||
errorMessages.add(jo.string("message") ?: "No message found")
|
||||
})
|
||||
val end = if (i >= fileCount) "\n" else ""
|
||||
log(1, " Uploading " + (i++) + " / $fileCount$end", false)
|
||||
log(1, " Uploading " + (i++) + " / $fileCount$end $dots", false)
|
||||
}
|
||||
if (errorMessages.isEmpty()) {
|
||||
return TaskResult()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue