File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -245,14 +245,14 @@ export class Commands{
245245vscode . workspace . getConfiguration ( ) ,
246246) ;
247247const needsToken = needToken ( vscode . workspace . getConfiguration ( ) ) ;
248- try {
249- const user = await client . getAuthenticatedUser ( ) ;
250- // For non-token auth, we write a blank token since the `vscodessh`
251- // command currently always requires a token file.
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+ const user = await client . getAuthenticatedUser ( ) ;
251+ // For non-token auth, we write a blank token since the `vscodessh`
252+ // command currently always requires a token file.
253+ // For token auth, we have valid access so we can just return the user here
254+ return { token : needsToken && token ? token : "" , user } ;
255+ } catch ( err ) {
256256const message = getErrorMessage ( err , "no response from the server" ) ;
257257if ( isAutoLogin ) {
258258this . storage . output . warn (
You can’t perform that action at this time.
0 commit comments