1
0
mirror of https://github.com/docker/cli.git synced 2026-01-26 15:41:42 +03:00

image/tree: Use streams interface

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski
2025-11-04 13:30:12 +01:00
parent 30d597df10
commit 1a261e3f50

View File

@@ -224,12 +224,12 @@ func getPossibleChips(view treeView) (chips []imageChip) {
return possible
}
func printImageTree(dockerCLI command.Cli, view treeView) {
if streamRedirected(dockerCLI.Out()) {
_, _ = fmt.Fprintln(dockerCLI.Err(), "WARNING: This output is designed for human readability. For machine-readable output, please use --format.")
func printImageTree(outs command.Streams, view treeView) {
if streamRedirected(outs.Out()) {
_, _ = fmt.Fprintln(outs.Err(), "WARNING: This output is designed for human readability. For machine-readable output, please use --format.")
}
out := tui.NewOutput(dockerCLI.Out())
out := tui.NewOutput(outs.Out())
_, width := out.GetTtySize()
if width == 0 {
width = 80