File tree 3 files changed +16
-2
lines changed
3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ appveyor = { repository = "alexcrichton/git2-rs" }
24
24
url = " 1.0"
25
25
bitflags = " 1.0"
26
26
libc = " 0.2"
27
+ log = " 0.4"
27
28
libgit2-sys = { path = " libgit2-sys" , version = " 0.7.0" }
28
29
29
30
[target ."cfg(all(unix, not(target_os = \"macos\")))" .dependencies ]
Original file line number Diff line number Diff line change @@ -287,7 +287,13 @@ impl CredentialHelper {
287
287
fn execute_cmd ( & self , cmd : & str , username : & Option < String > )
288
288
-> ( Option < String > , Option < String > ) {
289
289
macro_rules! my_try( ( $e: expr) => (
290
- match $e { Ok ( e) => e, Err ( ..) => return ( None , None ) }
290
+ match $e {
291
+ Ok ( e) => e,
292
+ Err ( e) => {
293
+ debug!( "{} failed with {}" , stringify!( $e) , e) ;
294
+ return ( None , None )
295
+ }
296
+ }
291
297
) ) ;
292
298
293
299
let mut p = my_try ! ( Command :: new( "sh" ) . arg( "-c" )
@@ -311,7 +317,13 @@ impl CredentialHelper {
311
317
}
312
318
}
313
319
let output = my_try ! ( p. wait_with_output( ) ) ;
314
- if !output. status . success ( ) { return ( None , None ) }
320
+ if !output. status . success ( ) {
321
+ debug ! ( "credential helper failed: {}\n stdout ---\n {}\n stdout ---\n {}" ,
322
+ output. status,
323
+ String :: from_utf8_lossy( & output. stdout) ,
324
+ String :: from_utf8_lossy( & output. stderr) ) ;
325
+ return ( None , None )
326
+ }
315
327
self . parse_output ( output. stdout )
316
328
}
317
329
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ extern crate libc;
72
72
extern crate url;
73
73
extern crate libgit2_sys as raw;
74
74
#[ macro_use] extern crate bitflags;
75
+ #[ macro_use] extern crate log;
75
76
#[ cfg( test) ] extern crate tempdir;
76
77
77
78
use std:: ffi:: { CStr , CString } ;
You can’t perform that action at this time.
0 commit comments