From c6fef5613fc64037e591a6515c025d5ed559915c Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 5 Dec 2024 12:13:02 +0000 Subject: fix: `ngit`validate repo address exists when nostr address is unknown and user is prompted, validate that a the entered repo exists (there are events related to it) before proceeding --- src/bin/ngit/sub_commands/list.rs | 2 +- src/bin/ngit/sub_commands/send.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bin') diff --git a/src/bin/ngit/sub_commands/list.rs b/src/bin/ngit/sub_commands/list.rs index f79e284..b7bfd24 100644 --- a/src/bin/ngit/sub_commands/list.rs +++ b/src/bin/ngit/sub_commands/list.rs @@ -33,7 +33,7 @@ pub async fn launch() -> Result<()> { let client = Client::default(); - let repo_coordinates = get_repo_coordinates_when_remote_unknown(&git_repo).await?; + let repo_coordinates = get_repo_coordinates_when_remote_unknown(&git_repo, &client).await?; fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; diff --git a/src/bin/ngit/sub_commands/send.rs b/src/bin/ngit/sub_commands/send.rs index bc4d18a..e19c38b 100644 --- a/src/bin/ngit/sub_commands/send.rs +++ b/src/bin/ngit/sub_commands/send.rs @@ -54,7 +54,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs, no_fetch: bool) -> Re let mut client = Client::default(); - let repo_coordinates = get_repo_coordinates_when_remote_unknown(&git_repo).await?; + let repo_coordinates = get_repo_coordinates_when_remote_unknown(&git_repo, &client).await?; if !no_fetch { fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; -- cgit v1.2.3