replaced archived survey dep with osutils.YesNoPrompt helper
This commit is contained in:
@@ -23,9 +23,9 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/AlecAivazis/survey/v2"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
"github.com/pocketbase/pocketbase/tools/inflector"
|
||||
"github.com/pocketbase/pocketbase/tools/osutils"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -156,11 +156,7 @@ func (p *plugin) migrateCreateHandler(template string, args []string, interactiv
|
||||
resultFilePath := path.Join(dir, filename)
|
||||
|
||||
if interactive {
|
||||
confirm := false
|
||||
prompt := &survey.Confirm{
|
||||
Message: fmt.Sprintf("Do you really want to create migration %q?", resultFilePath),
|
||||
}
|
||||
survey.AskOne(prompt, &confirm)
|
||||
confirm := osutils.YesNoPrompt(fmt.Sprintf("Do you really want to create migration %q?", resultFilePath), false)
|
||||
if !confirm {
|
||||
fmt.Println("The command has been cancelled")
|
||||
return "", nil
|
||||
|
||||
Reference in New Issue
Block a user