1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 19:39:51 +03:00

logging: print text between *** in green (MR 2263)

Highlight messages like the following from pmbootstrap install:
  [19:45:59] *** (1/4) PREPARE NATIVE CHROOT ***

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Oliver Smith 2024-02-22 00:12:56 +00:00 committed by Pablo Correa Gómez
parent 385fc2cfc1
commit 6ba138b6b2
No known key found for this signature in database
GPG key ID: 7A342565FF635F79

View file

@ -47,6 +47,16 @@ class log_handler(logging.StreamHandler):
f"{styles['GREEN']}DONE!{styles['END']}",
1,
)
.replace(
"*** ",
f"{styles['GREEN']}*** ",
1,
)
.replace(
" ***",
f" ***{styles['END']}",
1,
)
)
stream.write(msg_col)