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

Commitc7df45f

Browse files
committed
Only try to authenticate when possible
1 parent20bc214 commitc7df45f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎src/commands.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,14 @@ export class Commands {
252252
vscode.workspace.getConfiguration(),
253253
);
254254
constneedsToken=needToken(vscode.workspace.getConfiguration());
255-
try{
256-
constuser=awaitclient.getAuthenticatedUser();
257-
// For non-token auth, we write a blank token since the `vscodessh`
258-
//command currently always requires atokenfile.
259-
//For token auth, we have valid access so we can just return the user here
260-
return{token:needsToken&&token ?token :"",user};
261-
}catch(err){
262-
if(!needToken(vscode.workspace.getConfiguration())){
255+
if(!needsToken||token){
256+
try{
257+
constuser=awaitclient.getAuthenticatedUser();
258+
//For non-token auth, we write a blanktokensince the `vscodessh`
259+
//command currently always requires a token file.
260+
// For token auth, we have valid access so we can just return theuserhere
261+
return{token:needsToken&&token ?token :"", user};
262+
}catch(err){
263263
constmessage=getErrorMessage(err,"no response from the server");
264264
if(isAutoLogin){
265265
this.logger.warn("Failed to log in to Coder server:",message);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp