File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,11 @@ export class PowerShellProcess {
4141 return new Promise < utils . IEditorServicesSessionDetails > (
4242 ( resolve , reject ) => {
4343 try {
44- const startScriptPath =
44+ const psesModulePath =
4545 path . resolve (
4646 __dirname ,
4747 this . bundledModulesPath ,
48- "PowerShellEditorServices/Start-EditorServices.ps1 " ) ;
48+ "PowerShellEditorServices/PowerShellEditorServices.psd1 " ) ;
4949
5050 const editorServicesLogPath = this . log . getLogFilePath ( logFileName ) ;
5151
@@ -73,9 +73,9 @@ export class PowerShellProcess {
7373 powerShellArgs . push ( "-ExecutionPolicy" , "Bypass" ) ;
7474 }
7575
76- const startEditorServices = "& '" +
77- PowerShellProcess . escapeSingleQuotes ( startScriptPath ) +
78- "' " + this . startArgs ;
76+ const startEditorServices = "Import-Module '" +
77+ PowerShellProcess . escapeSingleQuotes ( psesModulePath ) +
78+ "'; Start-EditorServices " + this . startArgs ;
7979
8080 if ( utils . isWindows ) {
8181 powerShellArgs . push (
@@ -108,7 +108,7 @@ export class PowerShellProcess {
108108 this . log . write (
109109 "Language server starting --" ,
110110 " exe: " + powerShellExePath ,
111- " args: " + startScriptPath + " " + this . startArgs ) ;
111+ " args: " + startEditorServices ) ;
112112
113113 // Make sure no old session file exists
114114 utils . deleteSessionFile ( this . sessionFilePath ) ;
You can’t perform that action at this time.
0 commit comments