From c99aa9126567c857683eb947f2baac5dff4b575a Mon Sep 17 00:00:00 2001 From: Simon de Vlieger Date: Tue, 8 Apr 2025 08:41:31 +0200 Subject: [PATCH] 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 --- cmd/image-builder/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/image-builder/main.go b/cmd/image-builder/main.go index 361120f..773fe86 100644 --- a/cmd/image-builder/main.go +++ b/cmd/image-builder/main.go @@ -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 {