From 9200b96bd8fe7ac254e41048790d7411937c3f95 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 22 Jan 2024 00:00:00 +0000 Subject: feat(claim): improve no remote error message so that the user knows why a remote is required --- src/sub_commands/claim.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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<()> { .input(PromptInputParms::default().with_prompt("description (Optional)"))?, }; - let git_server = git_repo.get_origin_url()?; + let git_server = git_repo + .get_origin_url() + .context( + "to claim the repository it must be available on a publically accessable git server", + ) + .context("no git remote origin configured")?; #[cfg(not(test))] let mut client = Client::default(); -- cgit v1.2.3