{"record":{"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/4f84911bfe8811e9b028e4b1fee8e7510be79387/cli/command/image/list.go#L140-L176","documentation":"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.","triggerScenarios":"`docker images --tree --no-trunc`.","commonSituations":"A wrapper script that injects --no-trunc globally for untruncated IDs clashes with the tree renderer.","solutions":["Drop --no-trunc when using --tree","Drop --tree if you require untruncated output","Scope --no-trunc to non-tree invocations only"],"exampleFix":"// before\ndocker images --tree --no-trunc\n// after\ndocker images --tree","handlingStrategy":"validation","validationCode":"if options.tree && options.noTrunc {\n    return errors.New(\"--no-trunc is not supported with --tree\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["images","cli","experimental"],"backgroundTag":null,"analyzedSha":"4f84911bfe8811e9b028e4b1fee8e7510be79387","analyzedAt":"2026-08-07T12:15:29.814Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}