Skip to content
Snippets Groups Projects
Commit 1c793e71 authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

fix password prompt for migratedb

parent 246596c5
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,10 @@
<!-- ### Dependencies -->
<!-- -->
## mytoken 0.3.2
- Fixed password prompt for migratedb
## mytoken 0.3.1
- Improved helper tools
......
......@@ -6,6 +6,7 @@ import (
"strings"
"time"
"github.com/Songmu/prompter"
log "github.com/sirupsen/logrus"
"github.com/zachmann/cli/v2"
"golang.org/x/term"
......@@ -107,6 +108,9 @@ var app = &cli.App{
} else if !force {
return fmt.Errorf("No mytoken servers specified. Please provide mytoken servers or use '-f' to force database migration.")
}
if dbConfig.Password == "" {
dbConfig.Password = prompter.Password("Enter password")
}
dbConfig.ReconnectInterval = 60
dbConfig.DBConf.Hosts = dbConfig.Hosts.Value()
db.ConnectConfig(dbConfig.DBConf)
......
......@@ -8,7 +8,7 @@ import (
const (
MAJOR = 0
MINOR = 3
FIX = 1
FIX = 2
DEV = false
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment