diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-12-05 12:13:02 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-12-05 12:13:02 +0000 |
| commit | c6fef5613fc64037e591a6515c025d5ed559915c (patch) | |
| tree | 552ab122c5c0ae4e07c72aecdc35d24eb579620f /src/bin/ngit | |
| parent | e00f712fb09d2a55fbfd36696f3725bc44c140f5 (diff) | |
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
Diffstat (limited to 'src/bin/ngit')
| -rw-r--r-- | src/bin/ngit/sub_commands/list.rs | 2 | ||||
| -rw-r--r-- | src/bin/ngit/sub_commands/send.rs | 2 |
2 files changed, 2 insertions, 2 deletions
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<()> { | |||
| 33 | 33 | ||
| 34 | let client = Client::default(); | 34 | let client = Client::default(); |
| 35 | 35 | ||
| 36 | let repo_coordinates = get_repo_coordinates_when_remote_unknown(&git_repo).await?; | 36 | let repo_coordinates = get_repo_coordinates_when_remote_unknown(&git_repo, &client).await?; |
| 37 | 37 | ||
| 38 | fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; | 38 | fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; |
| 39 | 39 | ||
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 | |||
| 54 | 54 | ||
| 55 | let mut client = Client::default(); | 55 | let mut client = Client::default(); |
| 56 | 56 | ||
| 57 | let repo_coordinates = get_repo_coordinates_when_remote_unknown(&git_repo).await?; | 57 | let repo_coordinates = get_repo_coordinates_when_remote_unknown(&git_repo, &client).await?; |
| 58 | 58 | ||
| 59 | if !no_fetch { | 59 | if !no_fetch { |
| 60 | fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; | 60 | fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; |