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

Commit70a6c4c

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

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
@@ -198,13 +198,13 @@ export class Commands {
198198
this.restClient.setHost(url);
199199
this.restClient.setSessionToken(res.token);
200200

201+
// Store on disk to be used by the cli.
202+
awaitthis.cliManager.configure(label,url,res.token);
203+
201204
// Store these to be used in later sessions.
202205
awaitthis.mementoManager.setUrl(url);
203206
awaitthis.secretsManager.setSessionToken(res.token);
204207

205-
// Store on disk to be used by the cli.
206-
awaitthis.cliManager.configure(label,url,res.token);
207-
208208
// These contexts control various menu items and the sidebar.
209209
awaitvscode.commands.executeCommand(
210210
"setContext",

‎src/extension.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,15 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
151151
consttoken=needToken(vscode.workspace.getConfiguration())
152152
?params.get("token")
153153
:(params.get("token")??"");
154+
155+
// Store on disk to be used by the cli.
156+
awaitcliManager.configure(toSafeHost(url),url,token);
157+
154158
if(token){
155159
client.setSessionToken(token);
156160
awaitsecretsManager.setSessionToken(token);
157161
}
158162

159-
// Store on disk to be used by the cli.
160-
awaitcliManager.configure(toSafeHost(url),url,token);
161-
162163
vscode.commands.executeCommand(
163164
"coder.open",
164165
owner,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp