Adapt to changes in ExecUtil (#8690)

Signed-off-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
This commit is contained in:
Connor Petty
2020-10-08 12:08:11 -07:00
committed by GitHub
parent 178e657d80
commit 0496d35f32
4 changed files with 36 additions and 10 deletions

View File

@@ -12,6 +12,8 @@
*/
package org.openhab.transform.exec.internal;
import java.time.Duration;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.core.io.net.exec.ExecUtil;
@@ -64,7 +66,8 @@ public class ExecTransformationService implements TransformationService {
long startTime = System.currentTimeMillis();
String formattedCommandLine = String.format(commandLine, source);
String result = ExecUtil.executeCommandLineAndWaitResponse(formattedCommandLine, 5000);
String result = ExecUtil.executeCommandLineAndWaitResponse(Duration.ofSeconds(5),
formattedCommandLine.split(" "));
logger.trace("command line execution elapsed {} ms", System.currentTimeMillis() - startTime);
return result;