Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit27569d2

Browse files
committed
Attempt to fix race condition between cliManager and secretsManager setting the session token
1 parent21523b1 commit27569d2

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

‎src/commands.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,13 @@ export class Commands {
211211
this.restClient.setHost(url);
212212
this.restClient.setSessionToken(res.token);
213213

214+
// Store on disk to be used by the cli.
215+
awaitthis.cliManager.configure(label,url,res.token);
216+
214217
// Store these to be used in later sessions.
215218
awaitthis.mementoManager.setUrl(url);
216219
awaitthis.secretsManager.setSessionToken(res.token);
217220

218-
// Store on disk to be used by the cli.
219-
awaitthis.cliManager.configure(label,url,res.token);
220-
221221
// These contexts control various menu items and the sidebar.
222222
awaitvscode.commands.executeCommand(
223223
"setContext",

‎src/extension.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,15 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
167167
consttoken=needToken(vscode.workspace.getConfiguration())
168168
?params.get("token")
169169
:(params.get("token")??"");
170+
171+
// Store on disk to be used by the cli.
172+
awaitcliManager.configure(toSafeHost(url),url,token);
173+
170174
if(token){
171175
client.setSessionToken(token);
172176
awaitsecretsManager.setSessionToken(token);
173177
}
174178

175-
// Store on disk to be used by the cli.
176-
awaitcliManager.configure(toSafeHost(url),url,token);
177-
178179
vscode.commands.executeCommand(
179180
"coder.open",
180181
owner,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp