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:
parent
521f4f3781
commit
3cec77c9d5
1 changed files with 6 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue