ProcessHandler (@NotNull Process process, @NotNull String commandLineString, @NotNull TargetEnvironment targetEnvironment, @NotNull TargetedCommandLine commandLine) { ProcessHandler processHandler = createProcessHandler(process, commandLineString, targetEnvironment, commandLine); if (processHandler instanceof OSProcessHandler osProcessHandler) { osProcessHandler.setHasPty(myRunWithPty); } return processHandler; }