diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-01-22 00:00:00 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-01-22 00:00:00 +0000 |
| commit | 9200b96bd8fe7ac254e41048790d7411937c3f95 (patch) | |
| tree | 96d030e3f9f21a0ee118ff982d283a93a5dbb358 /src | |
| parent | 56956030952e4e997f906bf77b2b6e097dde5650 (diff) | |
feat(claim): improve no remote error message
so that the user knows why a remote is required
Diffstat (limited to 'src')
| -rw-r--r-- | src/sub_commands/claim.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sub_commands/claim.rs b/src/sub_commands/claim.rs index 2573267..984fab0 100644 --- a/src/sub_commands/claim.rs +++ b/src/sub_commands/claim.rs | |||
| @@ -55,7 +55,12 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 55 | .input(PromptInputParms::default().with_prompt("description (Optional)"))?, | 55 | .input(PromptInputParms::default().with_prompt("description (Optional)"))?, |
| 56 | }; | 56 | }; |
| 57 | 57 | ||
| 58 | let git_server = git_repo.get_origin_url()?; | 58 | let git_server = git_repo |
| 59 | .get_origin_url() | ||
| 60 | .context( | ||
| 61 | "to claim the repository it must be available on a publically accessable git server", | ||
| 62 | ) | ||
| 63 | .context("no git remote origin configured")?; | ||
| 59 | 64 | ||
| 60 | #[cfg(not(test))] | 65 | #[cfg(not(test))] |
| 61 | let mut client = Client::default(); | 66 | let mut client = Client::default(); |