upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin/ngit/sub_commands/init.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/ngit/sub_commands/init.rs')
-rw-r--r--src/bin/ngit/sub_commands/init.rs15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/bin/ngit/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs
index 8f9ff0d..50b8b3c 100644
--- a/src/bin/ngit/sub_commands/init.rs
+++ b/src/bin/ngit/sub_commands/init.rs
@@ -212,7 +212,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
212 let mut maintainers_string = if !args.other_maintainers.is_empty() { 212 let mut maintainers_string = if !args.other_maintainers.is_empty() {
213 [args.other_maintainers.clone()].concat().join(" ") 213 [args.other_maintainers.clone()].concat().join(" ")
214 } else if repo_ref.is_none() && repo_config_result.is_err() { 214 } else if repo_ref.is_none() && repo_config_result.is_err() {
215 signer.public_key().await?.to_bech32()? 215 signer.get_public_key().await?.to_bech32()?
216 } else { 216 } else {
217 let maintainers = if let Ok(config) = &repo_config_result { 217 let maintainers = if let Ok(config) = &repo_config_result {
218 config.maintainers.clone() 218 config.maintainers.clone()
@@ -225,7 +225,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
225 .collect() 225 .collect()
226 } else { 226 } else {
227 //unreachable 227 //unreachable
228 vec![signer.public_key().await?.to_bech32()?] 228 vec![signer.get_public_key().await?.to_bech32()?]
229 }; 229 };
230 // add current user if not present 230 // add current user if not present
231 if maintainers.iter().any(|m| { 231 if maintainers.iter().any(|m| {
@@ -237,9 +237,12 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
237 }) { 237 }) {
238 maintainers.join(" ") 238 maintainers.join(" ")
239 } else { 239 } else {
240 [maintainers, vec![signer.public_key().await?.to_bech32()?]] 240 [
241 .concat() 241 maintainers,
242 .join(" ") 242 vec![signer.get_public_key().await?.to_bech32()?],
243 ]
244 .concat()
245 .join(" ")
243 } 246 }
244 }; 247 };
245 'outer: loop { 248 'outer: loop {
@@ -263,7 +266,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
263 } 266 }
264 // add current user incase removed 267 // add current user incase removed
265 if !maintainers.iter().any(|m| user_ref.public_key.eq(m)) { 268 if !maintainers.iter().any(|m| user_ref.public_key.eq(m)) {
266 maintainers.push(signer.public_key().await?); 269 maintainers.push(signer.get_public_key().await?);
267 } 270 }
268 break maintainers; 271 break maintainers;
269 } 272 }