diff options
Diffstat (limited to 'vendor/gix-credentials/examples/invoke-git-credential.rs')
-rw-r--r-- | vendor/gix-credentials/examples/invoke-git-credential.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/vendor/gix-credentials/examples/invoke-git-credential.rs b/vendor/gix-credentials/examples/invoke-git-credential.rs deleted file mode 100644 index cba3f5f70..000000000 --- a/vendor/gix-credentials/examples/invoke-git-credential.rs +++ /dev/null @@ -1,14 +0,0 @@ -use std::convert::TryInto; - -/// Invokes `git credential` with the passed url as argument and prints obtained credentials. -pub fn main() -> Result<(), Box<dyn std::error::Error>> { - let out = gix_credentials::builtin(gix_credentials::helper::Action::get_for_url( - std::env::args() - .nth(1) - .ok_or("First argument must be the URL to obtain credentials for")?, - ))? - .ok_or("Did not obtain credentials")?; - let ctx: gix_credentials::protocol::Context = (&out.next).try_into()?; - ctx.write_to(std::io::stdout())?; - Ok(()) -} |