-
-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty Email check implemented #2969
Conversation
22ebde2
to
ddf87bd
Compare
internal/action/setup.go
Outdated
@@ -137,6 +138,10 @@ func (s *Action) initGenerateIdentity(ctx context.Context, crypto backend.Crypto | |||
} | |||
|
|||
email, err = termio.AskForString(ctx, "📧 What is your email?", email) | |||
|
|||
if strings.TrimSpace(email) == "" { | |||
return fmt.Errorf("failed to create a usable key pair") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disclaimer: I'm not a maintainer. But I think this message could be more user-friendly. Something like: "You did not provide an email. An email is required to generate a gpg key pair, so please provide one."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jcrben Can you please resolve this conversation?
cc224eb
to
58ec9d7
Compare
@dominikschulz Please review this |
internal/action/setup.go
Outdated
@@ -137,6 +138,10 @@ func (s *Action) initGenerateIdentity(ctx context.Context, crypto backend.Crypto | |||
} | |||
|
|||
email, err = termio.AskForString(ctx, "📧 What is your email?", email) | |||
|
|||
if strings.TrimSpace(email) == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think checking for the email string should happen after error handling in the next block, i.e. please move these lines below line 147.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done @dominikschulz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dominikschulz Can you please resolve this conversation?
58ec9d7
to
5ee7f73
Compare
Signed-off-by: gagandeepp <[email protected]>
Signed-off-by: gagandeepp <[email protected]>
Signed-off-by: gagandeepp <[email protected]>
Signed-off-by: gagandeepp <[email protected]>
Signed-off-by: gagandeepp <[email protected]>
5ee7f73
to
ed4df67
Compare
What's the story on the age backend? Does the bug also happen there? I don't really know much about age, not sure if it requires an email. |
@jcrben honestly no idea about it |
@dominikschulz please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@dominikschulz Can you please add hacktoberfest label to the issue? |
No need for emails with the |
@AnomalRoil I don't think we have the infrastructure to plumb through these different backend requirements, yet. |
Fixes: #2949