mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Stop cygpath from being called on non-Windows platforms.
This commit is contained in:
parent
2851469c4a
commit
6ad26ed053
1 changed files with 4 additions and 0 deletions
|
@ -19,6 +19,7 @@ import java.io.OutputStreamWriter;
|
|||
import org.eclipse.cdt.utils.spawner.ProcessFactory;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
|
||||
public class CygPath {
|
||||
|
||||
|
@ -28,6 +29,9 @@ public class CygPath {
|
|||
private final BufferedWriter stdin;
|
||||
|
||||
public CygPath(String command) throws IOException {
|
||||
if (!Platform.getOS().equals(Platform.OS_WIN32))
|
||||
// Don't run this on non-windows platforms
|
||||
throw new IOException("Not Windows"); //$NON-NLS-1$
|
||||
String[] args = {command, "--windows", "--file", "-"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
cygpath = ProcessFactory.getFactory().exec(args);
|
||||
stdin = new BufferedWriter(new OutputStreamWriter(cygpath.getOutputStream()));
|
||||
|
|
Loading…
Add table
Reference in a new issue