()
| 1034 | } |
| 1035 | |
| 1036 | private async getBundledModulesPath(): Promise<string> { |
| 1037 | // Because the extension is always at `<root>/out/main.js` |
| 1038 | let bundledModulesPath = path.resolve(__dirname, "../modules"); |
| 1039 | |
| 1040 | if ( |
| 1041 | this.extensionContext.extensionMode === |
| 1042 | vscode.ExtensionMode.Development |
| 1043 | ) { |
| 1044 | const devBundledModulesPath = path.resolve( |
| 1045 | __dirname, |
| 1046 | this.sessionSettings.developer.bundledModulesPath, |
| 1047 | ); |
| 1048 | |
| 1049 | // Make sure the module's bin path exists |
| 1050 | if (await utils.checkIfDirectoryExists(devBundledModulesPath)) { |
| 1051 | bundledModulesPath = devBundledModulesPath; |
| 1052 | } else { |
| 1053 | void this.logger.writeAndShowWarning( |
| 1054 | "In development mode but PowerShellEditorServices dev module path cannot be " + |
| 1055 | `found (or has not been built yet): ${devBundledModulesPath}\n`, |
| 1056 | ); |
| 1057 | } |
| 1058 | } |
| 1059 | |
| 1060 | return bundledModulesPath; |
| 1061 | } |
| 1062 | |
| 1063 | private getEditorServicesArgs( |
| 1064 | bundledModulesPath: string, |
no test coverage detected