Skip to content

Disable progress spinners in CI environments/non-TTY output #8

@ankon

Description

@ankon

The progress spinner produces a lot of unwanted log when the output isn't a TTY:

> foreach -g 'modules/{backend,frontend}' -c -x 'cd #{path} && npm ${npm_package_config_install_type}' && cd modules/web && npm ${npm_package_config_install_type}
�[?25l ⠋ Executing command: modules/backend
 ⠋ Executing command: modules/frontend
�[?25l�[1000D�[K�[1A�[1000D�[K�[1A�[1000D�[K ⠙ Executing command: modules/backend
 ⠙ Executing command: modules/frontend
�[?25l�[1000D�[K�[1A�[1000D�[K�[1A�[1000D�[K ⠹ Executing command: modules/backend
 ⠹ Executing command: modules/frontend
�[?25l�[1000D�[K�[1A�[1000D�[K�[1A�[1000D�[K ⠸ Executing command: modules/backend
 ⠸ Executing command: modules/frontend
�[?25l�[1000D�[K�[1A�[1000D�[K�[1A�[1000D�[K ⠼ Executing command: modules/backend
 ⠼ Executing command: modules/frontend
...

It would be nice if this could be disabled somehow, ideally by checking whether the stdout is a TTY.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions