Update progress log previewer to handle no-tty mode better - #7047
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the progress log previewer used by the CLI console to better respect azd’s TTY/non-TTY behavior by wiring previewer sizing to the console’s notion of width and attempting to avoid emitting blank preview frames when no terminal is available.
Changes:
- Pass an injected terminal-width function from
AskerConsoleinto the progress log previewer. - Add an early-return in
progressLog.Start()when terminal width is unavailable (<= 0) to avoid blank-line output.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
cli/azd/pkg/input/progress_log.go |
Adds a no-TTY guard in Start() and updates the terminal width comment. |
cli/azd/pkg/input/console.go |
Constructs the previewer with a width function based on c.consoleWidth. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Changes:
AZD_FORCE_TTYStart(). This was previously logging blank lines.Contributes to #6586