mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-11-11 08:37:16 +00:00
style(cli): import user_config for the GitHub host lookups
This commit is contained in:
parent
505e72119e
commit
904046dc72
3 changed files with 6 additions and 6 deletions
|
|
@ -499,7 +499,7 @@ impl InstallInputSource for InteractiveInstallInputSource {
|
|||
s: &Styles,
|
||||
_printer: Printer,
|
||||
) -> Result<GitHubInstallSelection> {
|
||||
let github_host = crate::user_config::github_host()?;
|
||||
let github_host = user_config::github_host()?;
|
||||
let gh_available = GhCli::detect(&github_host).await.is_some();
|
||||
|
||||
let token_label = if gh_available {
|
||||
|
|
@ -696,7 +696,7 @@ impl InstallInputSource for NonInteractiveInstallInputSource {
|
|||
_s: &Styles,
|
||||
_printer: Printer,
|
||||
) -> Result<GitHubInstallSelection> {
|
||||
let github_host = crate::user_config::github_host()?;
|
||||
let github_host = user_config::github_host()?;
|
||||
match self.args.github_strategy {
|
||||
Some(InstallGitHubStrategyArg::Token) => {
|
||||
let token = fabro_github::gh_auth_token(&github_host)
|
||||
|
|
@ -783,7 +783,7 @@ async fn choose_install_github_selection(
|
|||
return input.choose_github_install(s, printer).await;
|
||||
}
|
||||
|
||||
let github_host = crate::user_config::github_host()?;
|
||||
let github_host = user_config::github_host()?;
|
||||
match github_args.strategy {
|
||||
Some(InstallGitHubStrategyArg::Token) => {
|
||||
let token = fabro_github::gh_auth_token(&github_host)
|
||||
|
|
@ -982,7 +982,7 @@ async fn setup_github_app(
|
|||
printer: Printer,
|
||||
) -> Result<GitHubAppRegistration> {
|
||||
let app_name = owner.app_name(username);
|
||||
let github_host = crate::user_config::github_host()?;
|
||||
let github_host = user_config::github_host()?;
|
||||
|
||||
// Bind to random port
|
||||
let listener = TcpListener::bind("127.0.0.1:0")
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ async fn run_install_mode(bootstrap: InstallBootstrap, printer: Printer) -> Resu
|
|||
&bootstrap.storage_dir,
|
||||
&bootstrap.config_path,
|
||||
)
|
||||
.with_github_host(crate::user_config::github_host()?)
|
||||
.with_github_host(user_config::github_host()?)
|
||||
.with_finish_hook(persist_install_dev_token_hook());
|
||||
install::serve_install_command(bootstrap.bind_request, state, move |bind| {
|
||||
announce_install_mode(bind, &token, styles, printer);
|
||||
|
|
|
|||
|
|
@ -510,7 +510,7 @@ async fn get_github_repo(
|
|||
}
|
||||
};
|
||||
let installed =
|
||||
match fabro_github::check_app_installed(&client, &jwt, &owner, &name, &base_url)
|
||||
match fabro_github::check_app_installed(&client, &jwt, &owner, &name, base_url)
|
||||
.await
|
||||
{
|
||||
Ok(installed) => installed,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue