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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user