File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
3+ using System . Linq ;
34using System . Net . Http ;
45using System . Threading . Tasks ;
56using GitHub . Diagnostics ;
@@ -137,15 +138,21 @@ public async Task<ICredential> GetCredentialAsync(InputArguments input)
137138 if ( string . IsNullOrWhiteSpace ( userName ) )
138139 {
139140 IList < string > accounts = _context . CredentialStore . GetAccounts ( service ) ;
140- _context . Trace . WriteLine ( $ "Found { accounts . Count } accounts in the store for service={ service } .") ;
141+ _context . Trace . WriteLine ( $ "Found { accounts . Count } accounts in the store for service={ service } { ( accounts . Count > 0 ? ":" : "." ) } ") ;
142+ foreach ( string account in accounts )
143+ {
144+ _context . Trace . WriteLine ( $ " { account } ") ;
145+ }
141146
142147 switch ( accounts . Count )
143148 {
144149 case 1 :
150+ _context . Trace . WriteLine ( "Only one account available - using that one!" ) ;
145151 userName = accounts [ 0 ] ;
146152 break ;
147153
148154 case > 1 :
155+ _context . Trace . WriteLine ( "Multiple accounts available - prompting user to select one..." ) ;
149156 userName = await _gitHubAuth . SelectAccountAsync ( remoteUri , accounts ) ;
150157 addAccount = userName is null ;
151158 break ;
You can’t perform that action at this time.
0 commit comments