mirror of
https://github.com/anchore/syft.git
synced 2026-02-12 10:36:45 +01:00
cmd: IdentifyDistro returns a distro object which can be nil
Signed-off-by: Alfredo Deza <adeza@anchore.com>
This commit is contained in:
parent
dba5f0b197
commit
75375d0b58
@ -56,11 +56,11 @@ func doRunCmd(_ *cobra.Command, args []string) int {
|
|||||||
defer stereoscope.Cleanup()
|
defer stereoscope.Cleanup()
|
||||||
|
|
||||||
log.Info("Identifying Distro")
|
log.Info("Identifying Distro")
|
||||||
distro, err := imgbom.IdentifyDistro(img)
|
distro := imgbom.IdentifyDistro(img)
|
||||||
if err != nil {
|
if distro == nil {
|
||||||
log.Errorf("error identifying Distro: %w", err)
|
log.Errorf("error identifying distro")
|
||||||
} else {
|
} else {
|
||||||
log.Info(" Distro: %s", distro)
|
log.Infof(" Distro: %s", distro)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Info("Cataloging image")
|
log.Info("Cataloging image")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user