File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,20 +45,18 @@ async function runPylance(
4545 context : vscode . ExtensionContext ,
4646 pylanceExtension : vscode . Extension < unknown > ,
4747) : Promise < void > {
48- const { extensionPath , packageJSON } = pylanceExtension ;
49- const distUrl = ` ${ extensionPath } / dist` ;
48+ const { extensionUri , packageJSON } = pylanceExtension ;
49+ const distUrl = vscode . Uri . joinPath ( extensionUri , ' dist' ) ;
5050
5151 try {
52- const worker = new Worker ( ` ${ distUrl } / browser.server.bundle.js` ) ;
52+ const worker = new Worker ( vscode . Uri . joinPath ( distUrl , ' browser.server.bundle.js' ) . toString ( ) ) ;
5353
5454 // Pass the configuration as the first message to the worker so it can
5555 // have info like the URL of the dist folder early enough.
5656 //
5757 // This is the same method used by the TS worker:
5858 // https://github.com/microsoft/vscode/blob/90aa979bb75a795fd8c33d38aee263ea655270d0/extensions/typescript-language-features/src/tsServer/serverProcess.browser.ts#L55
59- const config : BrowserConfig = {
60- distUrl,
61- } ;
59+ const config : BrowserConfig = { distUrl : distUrl . toString ( ) } ;
6260 worker . postMessage ( config ) ;
6361
6462 const middleware = new LanguageClientMiddlewareBase (
You can’t perform that action at this time.
0 commit comments