mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 19:21:38 +02:00
Dont print "done" when doing nothing
This commit is contained in:
4
setup.py
4
setup.py
@@ -385,6 +385,7 @@ def parallel_run(items):
|
|||||||
elif compile_cmd.on_success is not None:
|
elif compile_cmd.on_success is not None:
|
||||||
compile_cmd.on_success()
|
compile_cmd.on_success()
|
||||||
|
|
||||||
|
printed = False
|
||||||
while items and failed is None:
|
while items and failed is None:
|
||||||
while len(workers) < num_workers and items:
|
while len(workers) < num_workers and items:
|
||||||
compile_cmd = items.pop()
|
compile_cmd = items.pop()
|
||||||
@@ -393,12 +394,13 @@ def parallel_run(items):
|
|||||||
print(' '.join(compile_cmd.cmd))
|
print(' '.join(compile_cmd.cmd))
|
||||||
else:
|
else:
|
||||||
print('\r\x1b[K[{}/{}] {}'.format(num, total, compile_cmd.desc), end='')
|
print('\r\x1b[K[{}/{}] {}'.format(num, total, compile_cmd.desc), end='')
|
||||||
|
printed = True
|
||||||
w = subprocess.Popen(compile_cmd.cmd, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
|
w = subprocess.Popen(compile_cmd.cmd, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
|
||||||
workers[w.pid] = compile_cmd, w
|
workers[w.pid] = compile_cmd, w
|
||||||
wait()
|
wait()
|
||||||
while len(workers):
|
while len(workers):
|
||||||
wait()
|
wait()
|
||||||
if not verbose:
|
if not verbose and printed:
|
||||||
print(' done')
|
print(' done')
|
||||||
if failed:
|
if failed:
|
||||||
print(failed.desc)
|
print(failed.desc)
|
||||||
|
|||||||
Reference in New Issue
Block a user