mirror of
https://github.com/anchore/syft.git
synced 2026-03-30 05:33:24 +02: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()
|
||||
|
||||
log.Info("Identifying Distro")
|
||||
distro, err := imgbom.IdentifyDistro(img)
|
||||
if err != nil {
|
||||
log.Errorf("error identifying Distro: %w", err)
|
||||
distro := imgbom.IdentifyDistro(img)
|
||||
if distro == nil {
|
||||
log.Errorf("error identifying distro")
|
||||
} else {
|
||||
log.Info(" Distro: %s", distro)
|
||||
log.Infof(" Distro: %s", distro)
|
||||
}
|
||||
|
||||
log.Info("Cataloging image")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user