pickware / scs-commander

A CLI tool for managing plugins in the Shopware Community Store.
MIT License
13 stars 2 forks source link

Don't use spinner, colored output and emojis when output is redirected #6

Open svenmuennich opened 7 years ago

svenmuennich commented 7 years ago

According to this SO thread, we can just use process.stdout.isTTY.

cjuner commented 6 years ago

For now, this should be an improvement wrt to processing redirected output: https://github.com/VIISON/scs-commander/pull/12

But yes, isTTY would be – non-proper TTY outputs like IDEs or automated build environments don't usually handle control characters well (e.g., deleted previous characters to delete the spinner)