Skip to content

Commit 47a82cd

Browse files
committed
(#172) Run configuration: fix issues with ANSI encoding
The details are outlined in an upstream issue, https://youtrack.jetbrains.com/issue/IDEA-339745
1 parent 41375c4 commit 47a82cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/kotlin/com/intellij/plugin/powershell/ide/run/PowerShellScriptCommandLineState.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import com.intellij.execution.ExecutionResult
66
import com.intellij.execution.Executor
77
import com.intellij.execution.configurations.PtyCommandLine
88
import com.intellij.execution.configurations.RunProfileState
9-
import com.intellij.execution.process.KillableColoredProcessHandler
9+
import com.intellij.execution.process.KillableProcessHandler
1010
import com.intellij.execution.process.ProcessHandler
1111
import com.intellij.execution.runners.ExecutionEnvironment
1212
import com.intellij.execution.runners.ProgramRunner
@@ -30,7 +30,7 @@ class PowerShellScriptCommandLineState(
3030
private val runConfiguration: PowerShellRunConfiguration,
3131
private val environment: ExecutionEnvironment) : RunProfileState {
3232

33-
lateinit var workingDirectory: Path
33+
private lateinit var workingDirectory: Path
3434
suspend fun prepareExecution() {
3535
val project = runConfiguration.project
3636
val file = withContext(Dispatchers.IO) { LocalFileSystem.getInstance().findFileByIoFile(File(runConfiguration.scriptPath)) }
@@ -60,7 +60,7 @@ class PowerShellScriptCommandLineState(
6060
logger.debug("Command line: $command")
6161
logger.debug("Environment: " + commandLine.environment.toString())
6262
logger.debug("Effective Environment: " + commandLine.effectiveEnvironment.toString())
63-
return KillableColoredProcessHandler(commandLine)
63+
return KillableProcessHandler(commandLine)
6464
} catch (e: PowerShellNotInstalled) {
6565
logger.warn("Can not start PowerShell: ${e.message}")
6666
throw ExecutionException(e.message, e)
@@ -97,7 +97,7 @@ class PowerShellScriptCommandLineState(
9797
return commandString
9898
}
9999

100-
override fun execute(executor: Executor?, runner: ProgramRunner<*>): ExecutionResult? {
100+
override fun execute(executor: Executor?, runner: ProgramRunner<*>): ExecutionResult {
101101
val process = startProcess()
102102
val console = TerminalExecutionConsole(environment.project, process)
103103
return DefaultExecutionResult(console, process)

0 commit comments

Comments
 (0)