From 426412dd82ac213d4427ad50591a907dc38574db Mon Sep 17 00:00:00 2001 From: Andrew Harvey Date: Sun, 16 May 2021 18:57:07 +1000 Subject: only log progress on TTY to avoid logging to gitlab ci --- bin/reduceOverlap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/reduceOverlap.js') diff --git a/bin/reduceOverlap.js b/bin/reduceOverlap.js index c5da852..62ba10d 100755 --- a/bin/reduceOverlap.js +++ b/bin/reduceOverlap.js @@ -41,7 +41,7 @@ const index = new Transform({ sourceCount++ if (!argv.quiet) { - if (sourceCount % 10000 === 0) { + if (process.stdout.isTTY && sourceCount % 10000 === 0) { process.stdout.write(` ${sourceCount / 1000}k\r`) } } @@ -67,7 +67,7 @@ const reduce = new Transform({ transform(key, encoding, callback) { reduceIndex++ if (!argv.quiet) { - if (reduceIndex % 10000 === 0) { + if (process.stdout.isTTY && reduceIndex % 10000 === 0) { process.stdout.write(` ${reduceIndex / 1000}k / ${Math.round(sourceCount / 1000)}k (${Math.round(reduceIndex / sourceCount * 100)}%)\r`) } } -- cgit v1.2.3