upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/bin/ngit/sub_commands
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-10-31 14:16:53 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2024-10-31 14:16:53 +0000
commit8f6c8f6f148a108cbbe11892fffc5cef729526c4 (patch)
treed3031773a0317d0cd883992f4238ef264d941a95 /src/bin/ngit/sub_commands
parentc59c4d0240d1a04adf8e97af117cb6e15f9e11d5 (diff)
feat(init): simplify maintainer selection
by first asking if the user is the only maintainer and if so not showing the npub selection option
Diffstat (limited to 'src/bin/ngit/sub_commands')
-rw-r--r--src/bin/ngit/sub_commands/init.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bin/ngit/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs
index 1519132..05160a8 100644
--- a/src/bin/ngit/sub_commands/init.rs
+++ b/src/bin/ngit/sub_commands/init.rs
@@ -246,6 +246,20 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
246 } 246 }
247 }; 247 };
248 'outer: loop { 248 'outer: loop {
249 if !dont_ask
250 && signer
251 .public_key()
252 .await?
253 .to_bech32()?
254 .eq(&maintainers_string)
255 && Interactor::default().confirm(
256 PromptConfirmParms::default()
257 .with_prompt("are you the only maintainer?")
258 .with_default(true),
259 )?
260 {
261 dont_ask = true;
262 }
249 if !dont_ask { 263 if !dont_ask {
250 println!("{}", &maintainers_string); 264 println!("{}", &maintainers_string);
251 maintainers_string = Interactor::default().input( 265 maintainers_string = Interactor::default().input(