From 45043c9a4e7e98273cddd20dd24dd202691efaff Mon Sep 17 00:00:00 2001 From: Eng Zer Jun Date: Tue, 22 Oct 2024 11:01:39 +0800 Subject: [PATCH] [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 Signed-off-by: Eng Zer Jun * Change default from true to false Reference: https://github.com/gopasspw/gopass/pull/2975#discussion_r1807806970 Signed-off-by: Eng Zer Jun --------- Signed-off-by: Eng Zer Jun --- internal/action/init.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/action/init.go b/internal/action/init.go index 60df646c70..1ea7a14c8d 100644 --- a/internal/action/init.go +++ b/internal/action/init.go @@ -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")