upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/lib/login
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/login')
-rw-r--r--src/lib/login/existing.rs8
-rw-r--r--src/lib/login/fresh.rs2
-rw-r--r--src/lib/login/mod.rs6
3 files changed, 9 insertions, 7 deletions
diff --git a/src/lib/login/existing.rs b/src/lib/login/existing.rs
index e388a34..342f792 100644
--- a/src/lib/login/existing.rs
+++ b/src/lib/login/existing.rs
@@ -81,13 +81,13 @@ fn get_signer_info(
81 break; 81 break;
82 } 82 }
83 } 83 }
84 result.context("cannot get or find signer info in cli arguments, local git config or global git config")? 84 result.context("failed to get or find signer info in cli arguments, local git config or global git config")?
85 } 85 }
86 Some(SignerInfoSource::CommandLineArguments) => { 86 Some(SignerInfoSource::CommandLineArguments) => {
87 if let Some(signer_info) = signer_info { 87 if let Some(signer_info) = signer_info {
88 (signer_info.clone(), SignerInfoSource::CommandLineArguments) 88 (signer_info.clone(), SignerInfoSource::CommandLineArguments)
89 } else { 89 } else {
90 bail!("cannot get signer from cli signer arguments because none were specified") 90 bail!("failed to get signer from cli signer arguments because none were specified")
91 } 91 }
92 } 92 }
93 Some(SignerInfoSource::GitLocal) => { 93 Some(SignerInfoSource::GitLocal) => {
@@ -169,7 +169,9 @@ async fn get_signer(
169 password.clone() 169 password.clone()
170 } else { 170 } else {
171 if !prompt_for_ncryptsec_password { 171 if !prompt_for_ncryptsec_password {
172 bail!("cannot login without prompts a nsec is encrypted with a password"); 172 bail!(
173 "failed to login without prompts a nsec is encrypted with a password"
174 );
173 } 175 }
174 Interactor::default() 176 Interactor::default()
175 .password(PromptPasswordParms::default().with_prompt("password")) 177 .password(PromptPasswordParms::default().with_prompt("password"))
diff --git a/src/lib/login/fresh.rs b/src/lib/login/fresh.rs
index 194f638..62622a8 100644
--- a/src/lib/login/fresh.rs
+++ b/src/lib/login/fresh.rs
@@ -627,7 +627,7 @@ fn silently_save_to_git_config(
627 let git_repo = if global { 627 let git_repo = if global {
628 &None 628 &None
629 } else if git_repo.is_none() { 629 } else if git_repo.is_none() {
630 bail!("cannot update local git config wihout git_repo object") 630 bail!("failed to update local git config wihout git_repo object")
631 } else { 631 } else {
632 git_repo 632 git_repo
633 }; 633 };
diff --git a/src/lib/login/mod.rs b/src/lib/login/mod.rs
index d2725e7..00dbb17 100644
--- a/src/lib/login/mod.rs
+++ b/src/lib/login/mod.rs
@@ -61,12 +61,12 @@ fn print_logged_in_as(
61 source: &SignerInfoSource, 61 source: &SignerInfoSource,
62) -> Result<()> { 62) -> Result<()> {
63 if !offline_mode && user_ref.metadata.created_at.eq(&Timestamp::from(0)) { 63 if !offline_mode && user_ref.metadata.created_at.eq(&Timestamp::from(0)) {
64 eprintln!("cannot find profile..."); 64 eprintln!("failed to find profile...");
65 } else if !offline_mode && user_ref.metadata.name.eq(&user_ref.public_key.to_bech32()?) { 65 } else if !offline_mode && user_ref.metadata.name.eq(&user_ref.public_key.to_bech32()?) {
66 eprintln!("cannot extract account name from account metadata..."); 66 eprintln!("failed to extract account name from account metadata...");
67 } else if !offline_mode && user_ref.relays.created_at.eq(&Timestamp::from(0)) { 67 } else if !offline_mode && user_ref.relays.created_at.eq(&Timestamp::from(0)) {
68 eprintln!( 68 eprintln!(
69 "cannot find your relay list. consider using another nostr client to create one to enhance your nostr experience." 69 "failed to find your relay list. consider using another nostr client to create one to enhance your nostr experience."
70 ); 70 );
71 } 71 }
72 eprintln!( 72 eprintln!(