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 @@ -211,13 +211,13 @@ export class Commands {
211
211
this . restClient . setHost ( url ) ;
212
212
this . restClient . setSessionToken ( res . token ) ;
213
213
214
+ // Store on disk to be used by the cli.
215
+ await this . cliManager . configure ( label , url , res . token ) ;
216
+
214
217
// Store these to be used in later sessions.
215
218
await this . mementoManager . setUrl ( url ) ;
216
219
await this . secretsManager . setSessionToken ( res . token ) ;
217
220
218
- // Store on disk to be used by the cli.
219
- await this . cliManager . configure ( label , url , res . token ) ;
220
-
221
221
// These contexts control various menu items and the sidebar.
222
222
await vscode . commands . executeCommand (
223
223
"setContext" ,
Original file line number Diff line number Diff line change @@ -167,14 +167,15 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
167
167
const token = needToken ( vscode . workspace . getConfiguration ( ) )
168
168
? params . get ( "token" )
169
169
: ( params . get ( "token" ) ?? "" ) ;
170
+
171
+ // Store on disk to be used by the cli.
172
+ await cliManager . configure ( toSafeHost ( url ) , url , token ) ;
173
+
170
174
if ( token ) {
171
175
client . setSessionToken ( token ) ;
172
176
await secretsManager . setSessionToken ( token ) ;
173
177
}
174
178
175
- // Store on disk to be used by the cli.
176
- await cliManager . configure ( toSafeHost ( url ) , url , token ) ;
177
-
178
179
vscode . commands . executeCommand (
179
180
"coder.open" ,
180
181
owner ,
You can’t perform that action at this time.
0 commit comments