main: describe auto-detect distro

Other commands such as `manifest`, and `build` auto detect the
distribution if none is given. `describe` is the odd one out that
requires `--distro`. Let's also autoselect there.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
Simon de Vlieger 2025-04-08 08:41:31 +02:00
parent 274a75387b
commit c99aa91265

View file

@ -355,6 +355,12 @@ func cmdDescribeImg(cmd *cobra.Command, args []string) error {
if archStr == "" {
archStr = arch.Current().String()
}
distroStr, err = findDistro(distroStr, "")
if err != nil {
return err
}
imgTypeStr := args[0]
res, err := getOneImage(distroStr, imgTypeStr, archStr, &repoOptions{DataDir: dataDir})
if err != nil {