docker/cli · error
--no-trunc is not yet supported with --tree
Error message
--no-trunc is not yet supported with --tree
What it means
Second check in shouldUseTree(): the experimental `--tree` view does not yet implement --no-trunc, so combining them is rejected. The tree layout controls its own truncation and ignores the global flag, hence the explicit guard.
Solutions
- Drop --no-trunc when using --tree
- Drop --tree if you require untruncated output
- Scope --no-trunc to non-tree invocations only
Example fix
// before docker images --tree --no-trunc // after docker images --tree
Defensive patterns
Strategy: validation
Validate before calling
if options.tree && options.noTrunc {
return errors.New("--no-trunc is not supported with --tree")
} Prevention
- Do not combine --tree with --no-trunc
- Scope global --no-trunc wrappers to non-tree invocations
- Use the tabular view when untruncated IDs are required
When it happens
Trigger: `docker images --tree --no-trunc`.
Common situations: A wrapper script that injects --no-trunc globally for untruncated IDs clashes with the tree renderer.
Related errors
- --quiet is not yet supported with --tree
- --show-digest is not yet supported with --tree
- --format is not yet supported with --tree
- requested load from stdin, but stdin is empty
- image prune has been cancelled
AI-assisted analysis of docker/cli@4f84911bfe (2026-08-07).
Data as JSON: /api/errors/e6e3018d83e91713.
Report an issue: GitHub.
Appendix: source
Thrown at cli/command/image/list.go:158
},
Digest: options.showDigests,
}
if err := formatter.ImageWrite(imageCtx, images); err != nil {
return 0, err
}
return len(images), nil
}
func shouldUseTree(options imagesOptions) (bool, error) {
if options.quiet {
if options.tree {
return false, errors.New("--quiet is not yet supported with --tree")
}
return false, nil
}
if options.noTrunc {
if options.tree {
return false, errors.New("--no-trunc is not yet supported with --tree")
}
return false, nil
}
if options.showDigests {
if options.tree {
return false, errors.New("--show-digest is not yet supported with --tree")
}
return false, nil
}
if options.format != "" {
if options.tree {
return false, errors.New("--format is not yet supported with --tree")
}
return false, nil
}
return true, nil
}
View on GitHub (pinned to 4f84911bfe)