trying to fix build error
diff --git a/build.gradle b/build.gradle
index 1e2ee5c..a3e260a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -166,8 +166,9 @@
             def process = installCommand.execute()
             process.waitFor()
             logger.debug("Standard out from executing \"${installCommand.join(" ")}\"\n" + process.in.readLines().collect{line -> "  $line"}.join("\n"))
-            if(process.err.text) {
-                logger.error("Standard err from executing \"${installCommand.join(" ")}\"\n" + process.err.readLines().collect { line -> "  $line"}.join("\n"))
+            def stderrOut = process.err.text
+            if(stderrOut) {
+                logger.error("Standard err from executing \"${installCommand.join(" ")}\"\n" + stderrOut.split("\n").collect { line -> "  $line"}.join("\n"))
             }
             installed = process.exitValue() == 0
         }catch (IOException e){