{"id":"280cdb2e0c3f2d44","repo":"docker/cli","slug":"quiet-is-not-yet-supported-with-tree","errorCode":null,"errorMessage":"--quiet is not yet supported with --tree","messagePattern":"--quiet is not yet supported with --tree","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/image/list.go","lineNumber":152,"sourceCode":"\n\timageCtx := formatter.ImageContext{\n\t\tContext: formatter.Context{\n\t\t\tOutput: dockerCLI.Out(),\n\t\t\tFormat: formatter.NewImageFormat(format, options.quiet, options.showDigests),\n\t\t\tTrunc:  !options.noTrunc,\n\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\")","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/image/list.go#L134-L170","documentation":"`docker image ls --tree` renders a multi-platform tree view whose output layout is incompatible with --quiet (which prints only image IDs, one per line). shouldUseTree in list.go explicitly rejects the flag combination rather than silently ignoring one flag; the tree view is a newer feature and quiet output for it has not been implemented ('not yet supported').","triggerScenarios":"Running `docker image ls --tree --quiet` (or `docker images --tree -q`). shouldUseTree returns this error whenever options.quiet and options.tree are both set.","commonSituations":"Scripts using `-q` to feed image IDs into xargs/rm while a user alias adds --tree by default; users exploring the new tree view and combining it with familiar flags; shell aliases like `alias di='docker images --tree'` breaking existing `di -q` usage.","solutions":["Drop --tree when you need IDs: `docker image ls -q`.","Drop -q/--quiet when you want the tree view: `docker image ls --tree`.","Remove --tree from aliases/wrappers used by scripts, or upgrade the docker CLI later once the combination is supported."],"exampleFix":"# before\ndocker image ls --tree -q\n# after\ndocker image ls -q","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}