Skip to content

Commit a75342a

Browse files
committed
Remove await on makeCoderSdk
makeCoderSdk is not async.
1 parent e335ced commit a75342a

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

src/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export class Commands {
238238
token: string,
239239
isAutologin: boolean,
240240
): Promise<{ user: User; token: string } | null> {
241-
const restClient = await makeCoderSdk(url, token, this.storage);
241+
const restClient = makeCoderSdk(url, token, this.storage);
242242
if (!needToken()) {
243243
try {
244244
const user = await restClient.getAuthenticatedUser();

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
6060
// the plugin to poll workspaces for the current login, as well as being used
6161
// in commands that operate on the current login.
6262
const url = storage.getUrl();
63-
const restClient = await makeCoderSdk(
63+
const restClient = makeCoderSdk(
6464
url || "",
6565
await storage.getSessionToken(),
6666
storage,

src/remote.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,7 @@ export class Remote {
255255
// break this connection. We could force close the remote session or
256256
// disallow logging out/in altogether, but for now just use a separate
257257
// client to remain unaffected by whatever the plugin is doing.
258-
const workspaceRestClient = await makeCoderSdk(
259-
baseUrlRaw,
260-
token,
261-
this.storage,
262-
);
258+
const workspaceRestClient = makeCoderSdk(baseUrlRaw, token, this.storage);
263259
// Store for use in commands.
264260
this.commands.workspaceRestClient = workspaceRestClient;
265261

0 commit comments

Comments
 (0)