Skip to content

Commit 02ce3ef

Browse files
committed
Fix server path not updated on restart.
1 parent afd1061 commit 02ce3ef

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/client.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export class ShaderLanguageClient {
234234
let platform = getServerPlatform();
235235
this.statusChangedCallback = (status) => {};
236236
this.serverPath = getPlatformBinaryUri(context.extensionUri, platform);
237-
this.serverVersion = getServerVersion(this.serverPath.fsPath, platform) || "shader-language-version";
237+
this.serverVersion = getServerVersion(this.serverPath.fsPath, platform) || "shader-language-server";
238238
this.errorHandler = new ShaderErrorHandler(this);
239239
}
240240

@@ -258,6 +258,9 @@ export class ShaderLanguageClient {
258258
this.channel = null;
259259
break;
260260
}
261+
let platform = getServerPlatform();
262+
this.serverPath = getPlatformBinaryUri(context.extensionUri, platform);
263+
this.serverVersion = getServerVersion(this.serverPath.fsPath, platform) || "shader-language-server";
261264
this.client = await createLanguageClient(context, this.channel, this.errorHandler);
262265
this.serverStatus = this.client !== null ? ServerStatus.running : ServerStatus.error;
263266
return this.serverStatus;

src/view/shaderStatusBar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class ShaderStatusBar {
1515
this.updateStatusBar();
1616
this.server.onStatusChanged(_ => {
1717
this.updateStatusBar();
18-
})
18+
});
1919
this.statusBar.show();
2020

2121
context.subscriptions.push(this.statusBar);

0 commit comments

Comments
 (0)