This commit is contained in:
Cyborus 2023-11-17 14:25:35 -05:00
parent 1a7f0de260
commit 66dd7096e4
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View file

@ -39,7 +39,8 @@ impl AuthCommand {
None => crate::readline("new key: ").await?, None => crate::readline("new key: ").await?,
}; };
if keys.hosts.get(&user).is_none() { if keys.hosts.get(&user).is_none() {
keys.hosts.insert(host, crate::keys::LoginInfo::new(user, key)); keys.hosts
.insert(host, crate::keys::LoginInfo::new(user, key));
} else { } else {
println!("key for {} already exists", host); println!("key for {} already exists", host);
} }
@ -56,4 +57,3 @@ impl AuthCommand {
Ok(()) Ok(())
} }
} }

View file

@ -9,8 +9,8 @@ use url::Url;
mod keys; mod keys;
use keys::*; use keys::*;
mod repo;
mod auth; mod auth;
mod repo;
#[derive(Parser, Debug)] #[derive(Parser, Debug)]
pub struct App { pub struct App {

View file

@ -1,6 +1,6 @@
use clap::Subcommand; use clap::Subcommand;
use url::Url;
use forgejo_api::CreateRepoOption; use forgejo_api::CreateRepoOption;
use url::Url;
#[derive(Subcommand, Clone, Debug)] #[derive(Subcommand, Clone, Debug)]
pub enum RepoCommand { pub enum RepoCommand {