From 256d5c1286228a20e3ff1684afd785f7cafa88fd Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Thu, 3 Sep 2015 10:02:48 -0500 Subject: [PATCH] driver/java: Don't error if Java isn't found; log if error parsing --- client/driver/java.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/driver/java.go b/client/driver/java.go index c3a07d0cb..2167ffc05 100644 --- a/client/driver/java.go +++ b/client/driver/java.go @@ -48,7 +48,7 @@ func (d *JavaDriver) Fingerprint(cfg *config.Config, node *structs.Node) (bool, err := cmd.Run() if err != nil { // assume Java wasn't found - return false, fmt.Errorf("Error detecting Java version: %s", err) + return false, nil } // 'java -version' returns output on Stderr typically. @@ -63,7 +63,8 @@ func (d *JavaDriver) Fingerprint(cfg *config.Config, node *structs.Node) (bool, } if infoString == "" { - return false, fmt.Errorf("Error parsing Java version information") + d.logger.Println("[WARN] Error parsing Java version information, aborting") + return false, nil } // Assume 'java -version' returns 3 lines: