How to execute more than one commands in one ShellTerminalWidget?
Answered
Hello.
val terminalView = TerminalView.getWidgetByContent(selectedContent) as ShellTerminalWidget
terminalView.executeCommand("some command")
This code work ok.
When I`m trying to call the same code again, exception occurs:
Cannot execute command when another command is typed: D:\_sources\IDEA\tests\Git Helper Test>
But not every time. Sometimes executes but mostly throws exception.
"D:\_sources\IDEA\tests\Git Helper Test>" is not command - this is terminal path
What I`m doing wrong?
Please sign in to leave a comment.
Artem,
This may happen when the previous command wasn't finished yet. You can check that with:
I always check running commands by terminalView.hasRunningCommands(). This is not the reason
Can I ask you to file an issue in YouTrack?
https://youtrack.jetbrains.com/issue/IJSDK-1032