File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -47,20 +47,18 @@ async function runPylance(
47
47
context : vscode . ExtensionContext ,
48
48
pylanceExtension : vscode . Extension < unknown > ,
49
49
) : 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' ) ;
52
52
53
53
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 ( ) ) ;
55
55
56
56
// Pass the configuration as the first message to the worker so it can
57
57
// have info like the URL of the dist folder early enough.
58
58
//
59
59
// This is the same method used by the TS worker:
60
60
// 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 ( ) } ;
64
62
worker . postMessage ( config ) ;
65
63
66
64
const middleware = new LanguageClientMiddlewareBase (
You can’t perform that action at this time.
0 commit comments