Skip to content

Commit d337fe2

Browse files
committed
fix: Remove unneeded withPtty: true from process handler
Resolves #253
1 parent c220bb4 commit d337fe2

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
99
### Fixed
1010

1111
- [[#252]](https://github.com/Roboroads/laravel-tinker/issues/252) Cast exception when running on an SSH interpreter
12+
- [[#253]](https://github.com/Roboroads/laravel-tinker/issues/253) Remove unneeded `withPtty: true` from process handler
1213

1314
## [2.6.0] - 2023-04-16
1415

src/main/kotlin/nl/deschepers/laraveltinker/util/PhpArtisanTinkerUtil.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class PhpArtisanTinkerUtil(private val project: Project, private val phpCode: St
9898
val tinkerRunSettings = projectSettings.parseJson()
9999
phpCommandSettings.addArguments(listOf("-r", phpTinkerCodeRunnerCode, phpCode, tinkerRunSettings.toString()))
100100

101-
processHandler = getAnsiUnfilteredProcessHandler(runConfiguration.createProcessHandler(project, phpCommandSettings, true))
101+
processHandler = getAnsiUnfilteredProcessHandler(runConfiguration.createProcessHandler(project, phpCommandSettings))
102102

103103
ProcessTerminatedListener.attach(processHandler, project, "")
104104
} catch (ex: ExecutionException) {
@@ -144,10 +144,6 @@ class PhpArtisanTinkerUtil(private val project: Project, private val phpCode: St
144144
}
145145

146146
private fun getAnsiUnfilteredProcessHandler(processHandler: ProcessHandler): ProcessHandler {
147-
if (processHandler is KillableProcessHandler) {
148-
return processHandler
149-
}
150-
151147
if (processHandler is OSProcessHandler) {
152148
return KillableProcessHandler(processHandler.process, processHandler.commandLine)
153149
}
@@ -156,7 +152,7 @@ class PhpArtisanTinkerUtil(private val project: Project, private val phpCode: St
156152
return BaseRemoteProcessHandler(processHandler.process, processHandler.commandLine, processHandler.charset)
157153
}
158154

159-
// Could not find suitable cast, return original
155+
// Could not find suitable cast, return original (colorless, but working) handler
160156
return processHandler
161157
}
162158
}

0 commit comments

Comments
 (0)