1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Fix test errors if cygpath not in path

This commit is contained in:
Anton Leherbauer 2009-04-28 10:21:57 +00:00
parent b10e6d881f
commit e89276f505

View file

@ -460,7 +460,12 @@ public class ResourceHelper {
throw new UnsupportedOperationException("Not a Windows system, Cygwin is unavailable.");
}
String[] args = {"cygpath", "-u", windowsPath};
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 cygwinPath = stdout.readLine();