1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix test errors if cygpath not in path #2

This commit is contained in:
Anton Leherbauer 2009-05-04 09:27:58 +00:00
parent 521f4f3781
commit 3cec77c9d5

View file

@ -489,7 +489,12 @@ public class ResourceHelper {
throw new UnsupportedOperationException("Not a Windows system, Cygwin is unavailable.");
}
String[] args = {"cygpath", "-w", cygwinPath};
Process cygpath = Runtime.getRuntime().exec(args);
Process cygpath;
try {
cygpath = Runtime.getRuntime().exec(args);
} catch (IOException ioe) {
throw new UnsupportedOperationException("Cygwin utility cygpath is not in the system search path.");
}
BufferedReader stdout = new BufferedReader(new InputStreamReader(cygpath.getInputStream()));
String windowsPath = stdout.readLine();