File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -198,13 +198,13 @@ export class Commands {
198
198
this . restClient . setHost ( url ) ;
199
199
this . restClient . setSessionToken ( res . token ) ;
200
200
201
+ // Store on disk to be used by the cli.
202
+ await this . cliManager . configure ( label , url , res . token ) ;
203
+
201
204
// Store these to be used in later sessions.
202
205
await this . mementoManager . setUrl ( url ) ;
203
206
await this . secretsManager . setSessionToken ( res . token ) ;
204
207
205
- // Store on disk to be used by the cli.
206
- await this . cliManager . configure ( label , url , res . token ) ;
207
-
208
208
// These contexts control various menu items and the sidebar.
209
209
await vscode . commands . executeCommand (
210
210
"setContext" ,
Original file line number Diff line number Diff line change @@ -151,14 +151,15 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
151
151
const token = needToken ( vscode . workspace . getConfiguration ( ) )
152
152
? params . get ( "token" )
153
153
: ( params . get ( "token" ) ?? "" ) ;
154
+
155
+ // Store on disk to be used by the cli.
156
+ await cliManager . configure ( toSafeHost ( url ) , url , token ) ;
157
+
154
158
if ( token ) {
155
159
client . setSessionToken ( token ) ;
156
160
await secretsManager . setSessionToken ( token ) ;
157
161
}
158
162
159
- // Store on disk to be used by the cli.
160
- await cliManager . configure ( toSafeHost ( url ) , url , token ) ;
161
-
162
163
vscode . commands . executeCommand (
163
164
"coder.open" ,
164
165
owner ,
You can’t perform that action at this time.
0 commit comments