Skip to content

Commit

Permalink
[FEATURE] Ask for setup if not initialized (#2975)
Browse files Browse the repository at this point in the history
* [FEATURE] Ask for setup if not initialized

Fixes #2963.

Tested-by: Eng Zer Jun <[email protected]>
Signed-off-by: Eng Zer Jun <[email protected]>

* Change default from true to false

Reference: #2975 (comment)
Signed-off-by: Eng Zer Jun <[email protected]>

---------

Signed-off-by: Eng Zer Jun <[email protected]>
  • Loading branch information
Juneezee authored Oct 22, 2024
1 parent 638e577 commit 45043c9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/action/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 45043c9

Please sign in to comment.