Skip to content

Commit

Permalink
Merge pull request #42 from hathora/gp/output-upload-to-stderr
Browse files Browse the repository at this point in the history
upload progress to stderr
  • Loading branch information
gwprice115 authored Aug 5, 2024
2 parents 52ac213 + 26a79c3 commit e199690
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/commands/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,9 @@ func uploadToUrl(uploadUrl string, uploadBodyParams []shared.UploadBodyParams, f
total: int64(requestBody.Len()),
callback: func(percentage float64, loaded int64, total int64, eof bool) {
if !eof {
fmt.Printf("Upload progress: %.2f%% (%d/%d bytes)\r", percentage, loaded, total)
os.Stderr.WriteString(fmt.Sprintf("Upload progress: %.2f%% (%d/%d bytes)\r", percentage, loaded, total))
} else {
fmt.Printf("Upload complete\n")
os.Stderr.WriteString("Upload complete\n")
}
},
}
Expand Down

0 comments on commit e199690

Please sign in to comment.