Open
Description
Describe the bug
When invoking commands like aws s3 cp
from scripts, the program issues ANSI sequences like the one for the progress notification (i.e. move cursor back to start of line). If these scripts not log their output to a file they instead result in a jumbled mess which is hard to read
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
If stdout/stderr is not connected to a terminal the CLI should either a) automatically infer --no-progress
, or b) write each progress update on a new line
Current Behavior
The ^M
is how less
represents these ANSI escapes
Reproduction Steps
aws s3 cp --no-progress ./foo s3://bar/ 2>log.txt
Possible Solution
This can be somewhat mitigated by explicitly using --no-progress
but doing so obviously hides any progress
Additional Information/Context
No response
CLI version used
awscli2-2.25.0
Environment details (OS name and version, etc.)
Fedora 42