observablehq / framework

A static site generator for data apps, dashboards, reports, and more. Observable Framework combines JavaScript on the front-end for interactive graphics with any language on the back-end for data analysis.
https://observablehq.com/framework/
ISC License
2.13k stars 85 forks source link

`deploy` spinner prints ANSI escape sequences in non-TTY environments, produces output without line breaks #1447

Closed mootari closed 2 days ago

mootari commented 2 weeks ago

The deploy command uses clack's spinner to print the upload progress for files. When running the command in a non-interactive environment the output still contains ANSI escape sequences used to clear the line, producing output like the following where all spinner updates are joined into a single line:

[?25l│
◒  3 / 3 uploading example-report.html◐  3 / 3 uploading example-report.html◓  3 / 3 uploading example-report.html◑  3 / 3 uploading example-report.html◒  3 / 3 uploading example-report.html◐  3 / 3 uploading example-report.html◓  3 / 3 uploading example-report.html◑  3 / 3 uploading example-report.html◇  3 uploaded, 49 unchanged, 52 total.
[?25hUploading build manifest... {

In most cases the output will also print color codes like [35m◒.

Related: #1446