Merge pull request #337 from future-architect/fix-error-handling

Fix error handling of detectOS
This commit is contained in:
Kota Kanbe
2017-02-14 11:58:43 +09:00
committed by GitHub

View File

@@ -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
}
@@ -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)