commit | 6af9dbfe17e0ddc004eb75ee00b0e0903757fd23 | [log] [tgz] |
---|---|---|
author | Eli Lipsitz <elipsitz@google.com> | Tue Jan 17 22:52:40 2023 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jan 17 22:52:40 2023 +0000 |
tree | ee7616cacac2f77ef456076985e290c1a8ab1a66 | |
parent | 595ea383848eb3a43e845fef4e7cf02909a6b702 [diff] |
pw_build: Make pw-wrap-ninja avoid terminal codes if non-interactive This commit makes the pw-wrap-ninja script avoid the use of ANSI terminal codes if it detects that it is running in a non-interactive context. This follows the same logic as Ninja: a terminal is interactive if all of the following are true: 1) stdout is a TTY 2) the TERM environment variable is set 3) the TERM environment variable is not "dumb" In this mode, the script will avoid printing out the live progress display (as this requires terminal codes). Instead, it'll just print out whenever an action finishes, along with any output from the action. Tested: Ran pw-wrap-ninja piped to tee, saw that the progress display was hidden, no ANSI escapes were visible, and the 'Finished...' lines were printed. Change-Id: I9a6a95599782f57ca422ee9af5bf5e5ad54678c6 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/126172 Reviewed-by: Rob Mohr <mohrr@google.com> Pigweed-Auto-Submit: Eli Lipsitz <elipsitz@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.