From a7c6040f0728cbcc8945b3cec023160c31469a6e Mon Sep 17 00:00:00 2001 From: tva Date: Thu, 6 Jun 2019 14:08:58 +0100 Subject: [PATCH] JAL-3285 add Cygwin environment path fix for Windows --- src/jalview/hmmer/HmmerCommand.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/jalview/hmmer/HmmerCommand.java b/src/jalview/hmmer/HmmerCommand.java index b5c1b25..73995af 100644 --- a/src/jalview/hmmer/HmmerCommand.java +++ b/src/jalview/hmmer/HmmerCommand.java @@ -112,6 +112,12 @@ public abstract class HmmerCommand implements Runnable { ProcessBuilder pb = new ProcessBuilder(args); pb.redirectErrorStream(true); // merge syserr to sysout + if (Platform.isWindows()) + { + String path = pb.environment().get("Path"); + path = jalview.bin.Cache.getProperty("CYGWIN_PATH") + ";" + path; + pb.environment().put("Path", path); + } final Process p = pb.start(); new Thread(new Runnable() { @@ -168,6 +174,7 @@ public abstract class HmmerCommand implements Runnable } List wrapped = new ArrayList<>(); + // wrapped.add("C:\Users\tva\run"); wrapped.add(bash.getAbsolutePath()); wrapped.add("-c"); -- 1.7.10.2