distro: don't fall back to fedora-30

Make osbuild-composer use FromHost() directly. Everywhere else needs to
specify the distro explicitly.

Also don't panic when a distro doesn't exist. Instead, return nil. Make
sure all callers check for that.
This commit is contained in:
Lars Karlitski 2019-11-28 19:49:45 +01:00
parent 70857963bb
commit 85e6182bdc
7 changed files with 34 additions and 33 deletions

View file

@ -32,6 +32,10 @@ func main() {
}
d := distro.New(distroArg)
if d == nil {
panic("unknown distro: " + distroArg)
}
pipeline, err := d.Pipeline(blueprint, format)
if err != nil {
panic(err.Error())