mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -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 "")
|
+ if (fileCount > 1) "..." else "")
|
||||||
var i = 1
|
var i = 1
|
||||||
val errorMessages = arrayListOf<String>()
|
val errorMessages = arrayListOf<String>()
|
||||||
|
var dots = ""
|
||||||
filesToUpload.forEach { file ->
|
filesToUpload.forEach { file ->
|
||||||
http.uploadFile(username, password, fileToPath(file) + optionPath, file,
|
http.uploadFile(username, password, fileToPath(file) + optionPath, file,
|
||||||
{ },
|
{ r: Response -> dots += "."},
|
||||||
{ r: Response ->
|
{ r: Response ->
|
||||||
|
dots += "X"
|
||||||
val jo = parseResponse(r.body().string())
|
val jo = parseResponse(r.body().string())
|
||||||
errorMessages.add(jo.string("message") ?: "No message found")
|
errorMessages.add(jo.string("message") ?: "No message found")
|
||||||
})
|
})
|
||||||
val end = if (i >= fileCount) "\n" else ""
|
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()) {
|
if (errorMessages.isEmpty()) {
|
||||||
return TaskResult()
|
return TaskResult()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue