mirror of
https://codeberg.org/Cyborus/forgejo-cli.git
synced 2024-11-10 03:59:31 +01:00
Merge pull request 'application settings page url should only be https
' (#119) from app-url-fix into main
Reviewed-on: https://codeberg.org/Cyborus/forgejo-cli/pulls/119
This commit is contained in:
commit
1281fb884d
1 changed files with 3 additions and 6 deletions
|
@ -35,12 +35,9 @@ impl AuthCommand {
|
||||||
oauth_login(keys, host_url, client_id).await?;
|
oauth_login(keys, host_url, client_id).await?;
|
||||||
} else {
|
} else {
|
||||||
let host_domain = host_url.host_str().ok_or_eyre("invalid host")?;
|
let host_domain = host_url.host_str().ok_or_eyre("invalid host")?;
|
||||||
let host_path = host_url.path();
|
let host_path = host_url.path().strip_suffix("/").unwrap_or(host_url.path());
|
||||||
let mut applications_url = host_url.clone();
|
let applications_url =
|
||||||
applications_url
|
format!("https://{host_domain}{host_path}/user/settings/applications");
|
||||||
.path_segments_mut()
|
|
||||||
.map_err(|_| eyre::eyre!("invalid url"))?
|
|
||||||
.extend(["user", "settings", "applications"]);
|
|
||||||
|
|
||||||
println!("{host_domain}{host_path} doesn't support easy login");
|
println!("{host_domain}{host_path} doesn't support easy login");
|
||||||
println!();
|
println!();
|
||||||
|
|
Loading…
Reference in a new issue