{"id":"e6e3018d83e91713","repo":"docker/cli","slug":"no-trunc-is-not-yet-supported-with-tree","errorCode":null,"errorMessage":"--no-trunc is not yet supported with --tree","messagePattern":"--no-trunc is not yet supported with --tree","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/image/list.go","lineNumber":158,"sourceCode":"\t\t},\n\t\tDigest: options.showDigests,\n\t}\n\tif err := formatter.ImageWrite(imageCtx, images); err != nil {\n\t\treturn 0, err\n\t}\n\treturn len(images), nil\n}\n\nfunc shouldUseTree(options imagesOptions) (bool, error) {\n\tif options.quiet {\n\t\tif options.tree {\n\t\t\treturn false, errors.New(\"--quiet is not yet supported with --tree\")\n\t\t}\n\t\treturn false, nil\n\t}\n\tif options.noTrunc {\n\t\tif options.tree {\n\t\t\treturn false, errors.New(\"--no-trunc is not yet supported with --tree\")\n\t\t}\n\t\treturn false, nil\n\t}\n\tif options.showDigests {\n\t\tif options.tree {\n\t\t\treturn false, errors.New(\"--show-digest is not yet supported with --tree\")\n\t\t}\n\t\treturn false, nil\n\t}\n\tif options.format != \"\" {\n\t\tif options.tree {\n\t\t\treturn false, errors.New(\"--format is not yet supported with --tree\")\n\t\t}\n\t\treturn false, nil\n\t}\n\treturn true, nil\n}\n","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/image/list.go#L140-L176","documentation":"The --tree view of `docker image ls` controls its own truncation and layout, so --no-trunc (which requests full untruncated IDs/digests in the tabular view) is not implemented for it. shouldUseTree rejects the combination explicitly with a 'not yet supported' error instead of producing misleading output.","triggerScenarios":"Running `docker image ls --tree --no-trunc` (or `docker images --tree --no-trunc`); shouldUseTree returns the error whenever both options.noTrunc and options.tree are set.","commonSituations":"Users wanting full sha256 digests from the tree view; scripts that always pass --no-trunc for parseable output being pointed at the tree mode; aliases adding --tree to a command family where --no-trunc was habitual.","solutions":["Use the classic view for full IDs: `docker image ls --no-trunc`.","Use `docker image ls --tree` without --no-trunc and accept truncated display, or get full digests via `docker image inspect <image> --format '{{index .RepoDigests 0}}'`.","Upgrade the CLI when the combination gains support."],"exampleFix":"# before\ndocker image ls --tree --no-trunc\n# after\ndocker image ls --no-trunc","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":["docker-cli","images","tree-view","flag-conflict"],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}