mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 16:07:12 -07:00
Disable animations with a system property.
This commit is contained in:
parent
0a0b478ba3
commit
7dc1183953
3 changed files with 5 additions and 3 deletions
|
@ -431,12 +431,14 @@ public class Main {
|
|||
}
|
||||
}
|
||||
|
||||
private static String PROPERTY_NO_ANIMATIONS = "com.beust.kobalt.noAnimations";
|
||||
|
||||
private void copyToStreamWithProgress(InputStream inputStream, OutputStream outputStream, long contentLength,
|
||||
String url) throws IOException {
|
||||
int bytesRead;
|
||||
long bytesSoFar = 0;
|
||||
byte[] buffer = new byte[100_000];
|
||||
boolean hasTerminal = System.console() != null;
|
||||
boolean hasTerminal = System.console() != null && System.getProperty(PROPERTY_NO_ANIMATIONS) == null;
|
||||
if (! hasTerminal) {
|
||||
log2(1, "\rDownloading " + url);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue