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

Commit05160e8

Browse files
committed
Only try to authenticate when possible
1 parentc3b2309 commit05160e8

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
@@ -245,14 +245,14 @@ export class Commands {
245245
vscode.workspace.getConfiguration(),
246246
);
247247
constneedsToken=needToken(vscode.workspace.getConfiguration());
248-
try{
249-
constuser=awaitclient.getAuthenticatedUser();
250-
// For non-token auth, we write a blank token since the `vscodessh`
251-
//command currently always requires atokenfile.
252-
//For token auth, we have valid access so we can just return the user here
253-
return{token:needsToken&&token ?token :"",user};
254-
}catch(err){
255-
if(!needToken(vscode.workspace.getConfiguration())){
248+
if(!needsToken||token){
249+
try{
250+
constuser=awaitclient.getAuthenticatedUser();
251+
//For non-token auth, we write a blanktokensince the `vscodessh`
252+
//command currently always requires a token file.
253+
// For token auth, we have valid access so we can just return theuserhere
254+
return{token:needsToken&&token ?token :"", user};
255+
}catch(err){
256256
constmessage=getErrorMessage(err,"no response from the server");
257257
if(isAutoLogin){
258258
this.storage.output.warn(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp