Przeglądaj źródła

Removing possible linebreaks that may return while discovering command

Jhonny Mertz 8 lat temu
rodzic
commit
f4458005a3

+ 1 - 1
src/main/java/com/github/jhonnymertz/wkhtmltopdf/wrapper/configurations/WrapperConfig.java

@@ -40,7 +40,7 @@ public class WrapperConfig {
             Process p = Runtime.getRuntime().exec(cmd);
             p.waitFor();
 
-            String text = IOUtils.toString(p.getInputStream(), Charset.defaultCharset());
+            String text = IOUtils.toString(p.getInputStream(), Charset.defaultCharset()).trim();
 
             if (text.isEmpty())
                 throw new RuntimeException();