Skip to content

Commit 4ecfcdb

Browse files
committed
Trace more output of the credential helper
1 parent bef6464 commit 4ecfcdb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/cred.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ impl CredentialHelper {
324324
String::from_utf8_lossy(&output.stderr));
325325
return (None, None)
326326
}
327+
trace!("credential helper stderr ---\n{}",
328+
String::from_utf8_lossy(&output.stderr));
327329
self.parse_output(output.stdout)
328330
}
329331

@@ -335,7 +337,13 @@ impl CredentialHelper {
335337
for line in output.split(|t| *t == b'\n') {
336338
let mut parts = line.splitn(2, |t| *t == b'=');
337339
let key = parts.next().unwrap();
338-
let value = match parts.next() { Some(s) => s, None => continue };
340+
let value = match parts.next() {
341+
Some(s) => s,
342+
None => {
343+
trace!("ignoring output line: {}", String::from_utf8_lossy(line));
344+
continue
345+
}
346+
};
339347
let value = match String::from_utf8(value.to_vec()) {
340348
Ok(s) => s,
341349
Err(..) => continue,

0 commit comments

Comments
 (0)