-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When windows username has a space, powershell terminal fails to initialize #17
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Comments
ForNeVeR
added
bug
Something isn't working
help wanted
Extra attention is needed
good first issue
Good for newcomers
labels
Sep 15, 2023
Reproduced even without changing my user name using the following patch: Index: src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/EditorServicesLanguageHostStarter.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/EditorServicesLanguageHostStarter.kt b/src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/EditorServicesLanguageHostStarter.kt
--- a/src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/EditorServicesLanguageHostStarter.kt (revision Staged)
+++ b/src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/EditorServicesLanguageHostStarter.kt (date 1694812411864)
@@ -39,7 +39,7 @@
open class EditorServicesLanguageHostStarter(protected val myProject: Project) : LanguageHostConnectionManager {
- private val LOG: Logger = Logger.getInstance(javaClass)
+ private val LOG: Logger = Logger.getInstance(javaClass)
private var socket: Socket? = null
private var myReadPipe: RandomAccessFile? = null
private var myWritePipe: RandomAccessFile? = null
@@ -208,7 +208,7 @@
"-LogLevel '$logLevel' -LogPath '$logPath' -SessionDetailsPath '$sessionDetailsPath' -FeatureFlags @() $splitInOutPipesSwitch"
val scriptText = "${escapePath(startupScript)} $args\n"
- val scriptFile = File.createTempFile("start-pses-host", ".ps1")
+ val scriptFile = File.createTempFile("start pses host", ".ps1")
scriptFile.deleteOnExit()
try {
FileUtil.writeToFile(scriptFile, scriptText)
@@ -415,4 +415,4 @@
override fun isConnected(): Boolean = myProcess?.isAlive == true
protected open fun getLogFileName(): String = "EditorServices-IJ-${getSessionCount()}"
private fun createLogPath(psExtensionPath: String): String = FileUtil.toCanonicalPath("$psExtensionPath/sessions/${getLogFileName()}.log")
-}
\ No newline at end of file
+} While I am planning to fix the issue, I'd recommend using the ordinary IDE terminal instead of this console. |
ForNeVeR
added a commit
that referenced
this issue
Mar 6, 2024
ForNeVeR
added a commit
that referenced
this issue
Mar 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
When the windows user folder contains a space, the powershell terminal fails to initialize.
Example Username: Fooby Doobar
The text was updated successfully, but these errors were encountered: