{"record":{"id":"8fec5716e68e2978","repo":"docker/cli","slug":"show-digest-is-not-yet-supported-with-tree","errorCode":null,"errorMessage":"--show-digest is not yet supported with --tree","messagePattern":"--show-digest is not yet supported with --tree","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/image/list.go","lineNumber":164,"sourceCode":"\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\n// isDangling is a copy of [formatter.isDangling].\nfunc isDangling(img image.Summary) bool {\n\tif len(img.RepoTags) == 0 {\n\t\treturn true\n\t}\n\treturn len(img.RepoTags) == 1 && img.RepoTags[0] == \"<none>:<none>\" && len(img.RepoDigests) == 1 && img.RepoDigests[0] == \"<none>@<none>\"","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/docker/cli/blob/4f84911bfe8811e9b028e4b1fee8e7510be79387/cli/command/image/list.go#L146-L182","documentation":"Third check in shouldUseTree(): the `--tree` view does not yet render the digests column, so `--show-digest` (the `--digests` flag) is incompatible and rejected.","triggerScenarios":"`docker images --tree --digests`.","commonSituations":"Auditing/inspection scripts that always request digests combined with the tree view.","solutions":["Drop --digests when using --tree","Use the tabular view (`--tree` off) to see digests","Run two separate invocations for tree vs digest output"],"exampleFix":"// before\ndocker images --tree --digests\n// after\ndocker images --digests","handlingStrategy":"validation","validationCode":"if options.tree && options.showDigests {\n    return errors.New(\"--show-digest is not supported with --tree\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not combine --tree with --digests","Run a separate `docker images --digests` when digest data is needed","Audit scripts that always request digests before enabling --tree"],"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"}