Skip to content

Commit ad8cb04

Browse files
committed
(#17) Host starter: use the -File command-line parameter to handle paths with spaces
1 parent a6929d6 commit ad8cb04

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
1212
- A bit more of IO work during language server connection moved to the corresponding threads, saving some IDE responsibility in rare cases when it could be a problem.
1313
- Increased timeout on connecting to the language server; should fix issues on slower computers.
1414
- [#42: The run configuration now uses terminal encoding](https://github.com/ant-druha/intellij-powershell/issues/42) (UTF-8 by default).
15+
- [#17: When the username has a space, the plugin fails to initialize](https://github.com/ant-druha/intellij-powershell/issues/17).
1516

1617
## [2.3.1] - 2023-12-30
1718
### Fixed

src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/EditorServicesLanguageHostStarter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ open class EditorServicesLanguageHostStarter(protected val myProject: Project) :
261261
command.add("-NoProfile")
262262
command.add("-NonInteractive")
263263
command.addAll(listOf("-ExecutionPolicy", "RemoteSigned")) // to run under default Restricted policy on PowerShell 5
264-
command.add(scriptFile.canonicalPath)
264+
command.addAll(listOf("-File", scriptFile.canonicalPath))
265265
logger.info("Language server startup command: '$command',\n launch command: $scriptText")
266266
return command
267267
}

0 commit comments

Comments
 (0)