Warn no ip (#922)

* fix(scan): ignore wp-cli stderr messages (#825) (#915)

* fix(scan): warn if unable to get ip address on the scan tareget server

* fix test case
This commit is contained in:
Kota Kanbe
2019-11-26 09:40:38 +09:00
committed by GitHub
parent 7936b3533b
commit 7f72b6ac69
3 changed files with 7 additions and 3 deletions

View File

@@ -75,7 +75,8 @@ func (o *alpine) apkUpdate() error {
func (o *alpine) preCure() error {
o.log.Infof("Scanning in %s", o.getServerInfo().Mode)
if err := o.detectIPAddr(); err != nil {
o.log.Debugf("Failed to detect IP addresses: %s", err)
o.log.Warnf("Failed to detect IP addresses: %s", err)
o.warns = append(o.warns, err)
}
// Ignore this error as it just failed to detect the IP addresses
return nil