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