Skip to content

Commit

Permalink
Empty Email check implemented (#2969)
Browse files Browse the repository at this point in the history
* Initial commit

Signed-off-by: gagandeepp <[email protected]>

* Initial commit

Signed-off-by: gagandeepp <[email protected]>

* Error Message fixed

Signed-off-by: gagandeepp <[email protected]>

* Review pointer implemented

Signed-off-by: gagandeepp <[email protected]>

* Extra lines removed

Signed-off-by: gagandeepp <[email protected]>

---------

Signed-off-by: gagandeepp <[email protected]>
  • Loading branch information
gagandeepp authored Oct 14, 2024
1 parent a5be685 commit 75baa9b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/action/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"os"
"path/filepath"
"strings"

"github.com/fatih/color"
"github.com/gopasspw/gopass/internal/action/exit"
Expand Down Expand Up @@ -140,6 +141,9 @@ func (s *Action) initGenerateIdentity(ctx context.Context, crypto backend.Crypto
if err != nil {
return err
}
if strings.TrimSpace(email) == "" {
return fmt.Errorf("⛔️ Please enter a valid email address to proceed")
}
}

passphrase := xkcdgen.Random()
Expand Down

0 comments on commit 75baa9b

Please sign in to comment.