Skip to content

Commit

Permalink
Fix error handling of detectOS
Browse files Browse the repository at this point in the history
  • Loading branch information
kotakanbe committed Feb 14, 2017
1 parent 97d8525 commit c686428
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scan/serverapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ func detectOS(c config.ServerInfo) (osType osTypeInterface) {

itsMe, osType, fatalErr = detectDebian(c)
if fatalErr != nil {
osType.setErrs([]error{
fmt.Errorf("Failed to detect OS: %s", fatalErr)})
return
}

Expand Down Expand Up @@ -282,7 +284,7 @@ func detectContainerOSesOnServer(containerHost osTypeInterface) (oses []osTypeIn
copied.SetContainer(config.Container{
ContainerID: containerInfo.ContainerID,
Name: containerInfo.Name,
Image: containerInfo.Image,
Image: containerInfo.Image,
Type: containerHostInfo.Container.Type,
})
os := detectOS(copied)
Expand Down

0 comments on commit c686428

Please sign in to comment.