From d1488fad3a89ef026c968c30766144a56528f11d Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 28 Nov 2024 07:47:08 +0000 Subject: feat(init): reorder web input so relays come straight after git server because they both require choices with some sort of mental burden --- src/bin/ngit/sub_commands/init.rs | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/bin') diff --git a/src/bin/ngit/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs index 0d3e344..1b9ba5e 100644 --- a/src/bin/ngit/sub_commands/init.rs +++ b/src/bin/ngit/sub_commands/init.rs @@ -302,25 +302,6 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { args.clone_url.clone() }; - let web: Vec = if args.web.is_empty() { - Interactor::default() - .input( - PromptInputParms::default() - .with_prompt("repo website") - .optional() - .with_default(if let Some(repo_ref) = &repo_ref { - repo_ref.web.clone().join(" ") - } else { - format!("https://gitworkshop.dev/repo/{}", &identifier) - }), - )? - .split(' ') - .map(std::string::ToString::to_string) - .collect() - } else { - args.web.clone() - }; - // TODO: check if relays are free to post to so contributors can submit patches // TODO: recommend some reliable free ones let relays: Vec = { @@ -364,6 +345,25 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { } }; + let web: Vec = if args.web.is_empty() { + Interactor::default() + .input( + PromptInputParms::default() + .with_prompt("repo website") + .optional() + .with_default(if let Some(repo_ref) = &repo_ref { + repo_ref.web.clone().join(" ") + } else { + format!("https://gitworkshop.dev/repo/{}", &identifier) + }), + )? + .split(' ') + .map(std::string::ToString::to_string) + .collect() + } else { + args.web.clone() + }; + let earliest_unique_commit = match &args.earliest_unique_commit { Some(t) => t.clone(), None => { -- cgit v1.2.3