mirror of
https://github.com/gopasspw/gopass.git
synced 2026-02-01 17:37:29 +00:00
[FEATURE] Ask for setup if not initialized (#2975)
* [FEATURE] Ask for setup if not initialized Fixes https://github.com/gopasspw/gopass/issues/2963. Tested-by: Eng Zer Jun <engzerjun@gmail.com> Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> * Change default from true to false Reference: https://github.com/gopasspw/gopass/pull/2975#discussion_r1807806970 Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> --------- Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
parent
638e577064
commit
45043c9a4e
@ -55,6 +55,15 @@ func (s *Action) IsInitialized(c *cli.Context) error {
|
||||
out.Printf(ctx, logo)
|
||||
out.Printf(ctx, "🌟 Welcome to gopass!")
|
||||
out.Noticef(ctx, "No existing configuration found.")
|
||||
|
||||
contSetup, err := termio.AskForBool(ctx, "❓ Do you want to continue to setup?", false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if contSetup {
|
||||
return s.Setup(c)
|
||||
}
|
||||
|
||||
out.Printf(ctx, "☝ Please run 'gopass setup'")
|
||||
|
||||
return exit.Error(exit.NotInitialized, err, "not initialized")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user