Skip to content

By default, disable progress indicator if stdout is redirected to a file #342

@jjvliu

Description

@jjvliu

When running a command like dust > dust.log, the output file will begin with an extremely long line that contains every copy of the progress indicator and control characters for erasing the terminal, such as

^M ^MIndexing: /path/to/dir 6894 files, 5.3G ... -^M                                                              ^MIndexing: /path/to/dir 14345 files, 268G ... \

A simple fix for this would be to enable the -P or --no-progress flag by default if dust detects that stdout was redirected to a file, for example using !isatty from libc.

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