@NotNull public PtyProcess start() throws IOException { if (myEnvironment == null) { myEnvironment = System.getenv(); } PtyProcessOptions options = new PtyProcessOptions(myCommand, myEnvironment, myDirectory, myRedirectErrorStream, myInitialColumns, myInitialRows); if (Platform.isWindows()) { if (myCygwin) { return new CygwinPtyProcess(myCommand, myEnvironment, myDirectory, myLogFile, myConsole); } return new WinPtyProcess(options, myConsole); } return new UnixPtyProcess(options, myConsole); } }
@Deprecated public static PtyProcess exec(String[] command, String[] environment, String workingDirectory, boolean console) throws IOException { if (Platform.isWindows()) { return new WinPtyProcess(command, environment, workingDirectory, console); } return new UnixPtyProcess(command, environment, workingDirectory, new Pty(console), console ? new Pty() : null); }