Skip to content

Commit

Permalink
Merge pull request #337 from future-architect/fix-error-handling
Browse files Browse the repository at this point in the history
Fix error handling of detectOS
  • Loading branch information
kotakanbe authored Feb 14, 2017
2 parents 97d8525 + c686428 commit a687c97
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 a687c97

Please sign in to comment.