diff options
Diffstat (limited to 'src/lib/login/existing.rs')
| -rw-r--r-- | src/lib/login/existing.rs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/lib/login/existing.rs b/src/lib/login/existing.rs index 342f792..872e459 100644 --- a/src/lib/login/existing.rs +++ b/src/lib/login/existing.rs | |||
| @@ -69,11 +69,18 @@ fn get_signer_info( | |||
| 69 | Ok(match source { | 69 | Ok(match source { |
| 70 | None => { | 70 | None => { |
| 71 | let mut result = None; | 71 | let mut result = None; |
| 72 | for source in &[ | 72 | for source in if std::env::var("NGITTEST").is_ok() { |
| 73 | SignerInfoSource::CommandLineArguments, | 73 | vec![ |
| 74 | SignerInfoSource::GitLocal, | 74 | SignerInfoSource::CommandLineArguments, |
| 75 | SignerInfoSource::GitGlobal, | 75 | SignerInfoSource::GitLocal, |
| 76 | ] { | 76 | ] |
| 77 | } else { | ||
| 78 | vec![ | ||
| 79 | SignerInfoSource::CommandLineArguments, | ||
| 80 | SignerInfoSource::GitLocal, | ||
| 81 | SignerInfoSource::GitGlobal, | ||
| 82 | ] | ||
| 83 | } { | ||
| 77 | if let Ok(res) = | 84 | if let Ok(res) = |
| 78 | get_signer_info(git_repo, signer_info, password, &Some(source.clone())) | 85 | get_signer_info(git_repo, signer_info, password, &Some(source.clone())) |
| 79 | { | 86 | { |