@@ -120,22 +120,25 @@ private async Task RunInternal()
120
120
121
121
await RestartRepository ( ) ;
122
122
123
- string credentialHelper = null ;
124
- var gitConfigGetTask = new GitConfigGetTask ( Environment , ProcessManager ,
125
- new TaskResultDispatcher < string > ( s => {
126
- credentialHelper = s ;
127
- } ) , "credential.helper" , GitConfigSource . Global ) ;
123
+ if ( Environment . IsWindows )
124
+ {
125
+ string credentialHelper = null ;
126
+ var gitConfigGetTask = new GitConfigGetTask ( Environment , ProcessManager ,
127
+ new TaskResultDispatcher < string > ( s => {
128
+ credentialHelper = s ;
129
+ } ) , "credential.helper" , GitConfigSource . Global ) ;
128
130
129
131
130
- await gitConfigGetTask . RunAsync ( CancellationToken . None ) ;
132
+ await gitConfigGetTask . RunAsync ( CancellationToken . None ) ;
131
133
132
- if ( credentialHelper != "wincred" )
133
- {
134
- var gitConfigSetTask = new GitConfigSetTask ( Environment , ProcessManager ,
135
- new TaskResultDispatcher < string > ( s => { } ) , "credential.helper" , "wincred" ,
136
- GitConfigSource . Global ) ;
134
+ if ( credentialHelper != "wincred" )
135
+ {
136
+ var gitConfigSetTask = new GitConfigSetTask ( Environment , ProcessManager ,
137
+ new TaskResultDispatcher < string > ( s => { } ) , "credential.helper" , "wincred" ,
138
+ GitConfigSource . Global ) ;
137
139
138
- await gitConfigSetTask . RunAsync ( CancellationToken . None ) ;
140
+ await gitConfigSetTask . RunAsync ( CancellationToken . None ) ;
141
+ }
139
142
}
140
143
}
141
144
0 commit comments