Clear out connection settings when running in session/connect mode
This commit is contained in:
parent
527c680e1f
commit
badcf700b9
@ -63,6 +63,15 @@ func ParseOptions(args []string) (Options, error) {
|
||||
opts.Sessions = false
|
||||
}
|
||||
|
||||
if opts.Sessions || opts.ConnectBackend != "" {
|
||||
opts.Url = ""
|
||||
opts.Host = ""
|
||||
opts.User = ""
|
||||
opts.Pass = ""
|
||||
opts.DbName = ""
|
||||
opts.Ssl = ""
|
||||
}
|
||||
|
||||
if opts.Prefix != "" && !strings.Contains(opts.Prefix, "/") {
|
||||
opts.Prefix = opts.Prefix + "/"
|
||||
}
|
||||
@ -75,10 +84,6 @@ func ParseOptions(args []string) (Options, error) {
|
||||
opts.AuthPass = os.Getenv("AUTH_PASS")
|
||||
}
|
||||
|
||||
if opts.Bookmark != "" && opts.Sessions {
|
||||
return opts, errors.New("--bookmark is not allowed in multi-session mode")
|
||||
}
|
||||
|
||||
if opts.ConnectBackend != "" {
|
||||
if !opts.Sessions {
|
||||
return opts, errors.New("--sessions flag must be set")
|
||||
|
Loading…
x
Reference in New Issue
Block a user