(
bundledModulesPath: string,
powerShellExeDetails: IPowerShellExeDetails,
)
| 1061 | } |
| 1062 | |
| 1063 | private getEditorServicesArgs( |
| 1064 | bundledModulesPath: string, |
| 1065 | powerShellExeDetails: IPowerShellExeDetails, |
| 1066 | ): string { |
| 1067 | let editorServicesArgs = |
| 1068 | "-HostName 'Visual Studio Code Host' " + |
| 1069 | "-HostProfileId 'Microsoft.VSCode' " + |
| 1070 | `-HostVersion '${this.HostVersion}' ` + |
| 1071 | `-BundledModulesPath '${utils.escapeSingleQuotes(bundledModulesPath)}' ` + |
| 1072 | "-EnableConsoleRepl "; |
| 1073 | |
| 1074 | if (this.sessionSettings.integratedConsole.suppressStartupBanner) { |
| 1075 | editorServicesArgs += "-StartupBanner '' "; |
| 1076 | } else if ( |
| 1077 | utils.isWindows && |
| 1078 | !powerShellExeDetails.supportsProperArguments |
| 1079 | ) { |
| 1080 | // NOTE: On Windows we don't Base64 encode the startup command |
| 1081 | // because it annoys some poorly implemented anti-virus scanners. |
| 1082 | // Unfortunately this means that for some installs of PowerShell |
| 1083 | // (such as through the `dotnet` package manager), we can't include |
| 1084 | // a multi-line startup banner as the quotes break the command. |
| 1085 | editorServicesArgs += `-StartupBanner '${this.DisplayName} Extension v${this.HostVersion}' `; |
| 1086 | } else { |
| 1087 | const startupBanner = `${this.DisplayName} Extension v${this.HostVersion} |
| 1088 | Copyright (c) Microsoft Corporation. |
| 1089 | |
| 1090 | https://aka.ms/vscode-powershell |
| 1091 | Type 'help' to get help. |
| 1092 | `; |
| 1093 | editorServicesArgs += `-StartupBanner "${startupBanner}" `; |
| 1094 | } |
| 1095 | |
| 1096 | // We guard this here too out of an abundance of precaution. |
| 1097 | if ( |
| 1098 | this.sessionSettings.developer.editorServicesWaitForDebugger && |
| 1099 | this.extensionContext.extensionMode === |
| 1100 | vscode.ExtensionMode.Development |
| 1101 | ) { |
| 1102 | editorServicesArgs += "-WaitForDebugger "; |
| 1103 | } |
| 1104 | const logLevel = vscode.workspace |
| 1105 | .getConfiguration("powershell.developer") |
| 1106 | .get<string>("editorServicesLogLevel"); |
| 1107 | editorServicesArgs += `-LogLevel '${logLevel}' `; |
| 1108 | |
| 1109 | return editorServicesArgs; |
| 1110 | } |
| 1111 | |
| 1112 | private async getVersionDetails(): Promise< |
| 1113 | IPowerShellVersionDetails | undefined |
no outgoing calls
no test coverage detected