File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,11 @@ export class PowerShellProcess {
41
41
return new Promise < utils . IEditorServicesSessionDetails > (
42
42
( resolve , reject ) => {
43
43
try {
44
- const startScriptPath =
44
+ const psesModulePath =
45
45
path . resolve (
46
46
__dirname ,
47
47
this . bundledModulesPath ,
48
- "PowerShellEditorServices/Start-EditorServices.ps1 " ) ;
48
+ "PowerShellEditorServices/PowerShellEditorServices.psd1 " ) ;
49
49
50
50
const editorServicesLogPath = this . log . getLogFilePath ( logFileName ) ;
51
51
@@ -73,9 +73,9 @@ export class PowerShellProcess {
73
73
powerShellArgs . push ( "-ExecutionPolicy" , "Bypass" ) ;
74
74
}
75
75
76
- const startEditorServices = "& '" +
77
- PowerShellProcess . escapeSingleQuotes ( startScriptPath ) +
78
- "' " + this . startArgs ;
76
+ const startEditorServices = "Import-Module '" +
77
+ PowerShellProcess . escapeSingleQuotes ( psesModulePath ) +
78
+ "'; Start-EditorServices " + this . startArgs ;
79
79
80
80
if ( utils . isWindows ) {
81
81
powerShellArgs . push (
@@ -108,7 +108,7 @@ export class PowerShellProcess {
108
108
this . log . write (
109
109
"Language server starting --" ,
110
110
" exe: " + powerShellExePath ,
111
- " args: " + startScriptPath + " " + this . startArgs ) ;
111
+ " args: " + startEditorServices ) ;
112
112
113
113
// Make sure no old session file exists
114
114
utils . deleteSessionFile ( this . sessionFilePath ) ;
You can’t perform that action at this time.
0 commit comments