You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2020/05/14 09:55:46 UTC

[plc4x] branch develop updated: Made the docker and opennssl detection safe against ioexeptions (if the tools are not installed at all)

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new f1838b0  Made the docker and opennssl detection safe against ioexeptions (if the tools are not installed at all)
f1838b0 is described below

commit f1838b033d1145775b7ceab88bd497aa96c9f9b2
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu May 14 11:55:39 2020 +0200

    Made the docker and opennssl detection safe against ioexeptions (if the tools are not installed at all)
---
 src/main/script/prerequisiteCheck.groovy | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/main/script/prerequisiteCheck.groovy b/src/main/script/prerequisiteCheck.groovy
index 6ae5d01..c86b5b5 100644
--- a/src/main/script/prerequisiteCheck.groovy
+++ b/src/main/script/prerequisiteCheck.groovy
@@ -256,10 +256,6 @@ def checkCmake() {
         def result = checkVersionAtLeast(curVersion, "3.0.0")
         if(!result) {
             allConditionsMet = false
-            
-            
-            
-            
         }
     } else {
         println "missing"
@@ -330,7 +326,12 @@ def checkBoost() {
 
 def checkOpenSSL() {
     print "Detecting OpenSSL version: "
-    def output = "openssl version".execute().text
+    def output
+    try {
+        output = "openssl version".execute().text
+    } catch(IOException e) {
+        output = ""
+    }
     Matcher matcher = extractVersion(output)
     if(matcher.size() > 0) {
         def curVersion = matcher[0][1]
@@ -348,7 +349,12 @@ def checkOpenSSL() {
 // Not only should the docker executable be available, but also should the docker daemon be running.
 def checkDocker() {
     print "Detecting Docker version:  "
-    def output = "docker info".execute().text
+    def output
+    try {
+        output = "docker info".execute().text
+    } catch(IOException e) {
+        output = ""
+    }
     // Check if Docker is installed at all
     def matcher1 = output =~ /Server:/
     if(matcher1.size() > 0) {