mirror of
https://codeberg.org/Cyborus/forgejo-cli.git
synced 2024-09-20 08:05:04 +02:00
format
This commit is contained in:
parent
68d255db7a
commit
87bb4d7840
1 changed files with 4 additions and 2 deletions
|
@ -12,7 +12,7 @@ mod repo;
|
||||||
|
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
pub struct App {
|
pub struct App {
|
||||||
#[clap(long, short='R')]
|
#[clap(long, short = 'R')]
|
||||||
remote: Option<String>,
|
remote: Option<String>,
|
||||||
#[clap(subcommand)]
|
#[clap(subcommand)]
|
||||||
command: Command,
|
command: Command,
|
||||||
|
@ -44,7 +44,9 @@ async fn main() -> eyre::Result<()> {
|
||||||
let host = host.map(|host| Url::parse(&host)).transpose()?;
|
let host = host.map(|host| Url::parse(&host)).transpose()?;
|
||||||
let url = match host {
|
let url = match host {
|
||||||
Some(url) => url,
|
Some(url) => url,
|
||||||
None => repo::RepoInfo::get_current(args.remote.as_deref())?.url().clone(),
|
None => repo::RepoInfo::get_current(args.remote.as_deref())?
|
||||||
|
.url()
|
||||||
|
.clone(),
|
||||||
};
|
};
|
||||||
let name = keys.get_login(&url)?.username();
|
let name = keys.get_login(&url)?.username();
|
||||||
eprintln!("currently signed in to {name}@{url}");
|
eprintln!("currently signed in to {name}@{url}");
|
||||||
|
|
Loading…
Reference in a new issue