Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5a4e111

Browse files
authored
Start EditorServices without start script (#2348)
1 parent 9033f14 commit 5a4e111

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎src/process.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /