File tree 2 files changed +13
-4
lines changed
2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ private async Task GetServiceTicket(KerberosClient client)
88
88
}
89
89
catch ( AggregateException aex )
90
90
{
91
- ICollection < Exception > exceptions = aex . InnerExceptions ;
91
+ ICollection < Exception > exceptions = aex . InnerExceptions ? . Where ( e => e != null ) ? . ToList ( ) ;
92
92
93
93
if ( exceptions == null )
94
94
{
@@ -100,16 +100,16 @@ private async Task GetServiceTicket(KerberosClient client)
100
100
}
101
101
}
102
102
103
- foreach ( var kex in exceptions . OfType < KerberosProtocolException > ( ) )
103
+ foreach ( var ex in exceptions . Where ( e => e != null ) )
104
104
{
105
- if ( kex . Error . ErrorCode == KerberosErrorCode . KRB_AP_ERR_TKT_EXPIRED )
105
+ if ( ex is KerberosProtocolException kex && kex ? . Error . ErrorCode == KerberosErrorCode . KRB_AP_ERR_TKT_EXPIRED )
106
106
{
107
107
await PurgeTickets ( ) ;
108
108
await client . GetServiceTicket ( this . ServicePrincipalName ) ;
109
109
break ;
110
110
}
111
111
112
- this . IO . Writer . WriteLine ( kex . Message ) ;
112
+ this . IO . Writer . WriteLine ( ex ? . Message ?? SR . Resource ( "Unknown Error" ) ) ;
113
113
}
114
114
}
115
115
}
Original file line number Diff line number Diff line change @@ -75,6 +75,15 @@ steps:
75
75
codeCoverageTool : Cobertura
76
76
summaryFileLocation : $(Build.SourcesDirectory)/coverlet/reports/Cobertura.xml
77
77
78
+ - task : NuGetAuthenticate@0
79
+ displayName : ' NuGet Authenticate'
80
+ - task : NuGetCommand@2
81
+ displayName : ' NuGet push'
82
+ inputs :
83
+ command : push
84
+ publishVstsFeed : ' Kerberos.NET/kerberos.net'
85
+ allowPackageConflicts : true
86
+
78
87
- publish : artifacts
79
88
displayName : Publish build packages
80
89
artifact : BuildPackages
You can’t perform that action at this time.
0 commit comments