File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -267,8 +267,9 @@ export async function resolveConnectionSpec(
267267
268268 if ( connSpec ) {
269269 const accessToken = await resolvePassword ( connSpec ) ;
270- connSpec . auth . resolve ( { accessToken } ) ;
271- resolvedConnSpecs . set ( serverName , connSpec ) ;
270+ if ( connSpec . auth . resolve ( { accessToken } ) ) {
271+ resolvedConnSpecs . set ( serverName , connSpec ) ;
272+ }
272273 }
273274}
274275
@@ -302,7 +303,7 @@ async function resolvePassword(
302303export async function resolveUsernameAndPassword (
303304 serverName : string ,
304305 oldSpec : serverManager . IServerSpec
305- ) : Promise < serverManager . IServerSpec | undefined > {
306+ ) : Promise < ResolvedConnSpec | undefined > {
306307 const { auth : _auth , ...newSpec } = oldSpec ;
307308 newSpec . name = serverName ;
308309 const auth = _auth ?. clone ( ) ;
@@ -319,7 +320,7 @@ export async function resolveUsernameAndPassword(
319320}
320321
321322/** Accessor for the cache of resolved connection specs */
322- export function getResolvedConnectionSpec ( key : string , dflt : serverManager . IServerSpec ) : serverManager . IServerSpec {
323+ export function getResolvedConnectionSpec ( key : string , dflt : ResolvedConnSpec ) : ResolvedConnSpec {
323324 let spec = resolvedConnSpecs . get ( key ) ;
324325 if ( spec ) {
325326 return spec ;
You can’t perform that action at this time.
0 commit comments