danvergara / dblab

The database client every command line junkie deserves.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Invalid db url" although it seems very correct

laurentS opened this issue · comments

Describe the bug

I run ~/path/to/dblab -u postgres://postgres:postgres@localhost:5432/mydb?sslmode=disable and get the following error (the db url is valid, I use it with psql and other tools.

Error: postgres://postgres:postgres@localhost:5432/openfindata?sslmode=disable: invalid url
Usage:
  dblab [flags]
  dblab [command]

Available Commands:
  help        Help about any command
  version     The version of the project

Flags:
      --config          get the connection data from a config file (default is $HOME/.dblab.yaml or the current directory)
      --db string       Database name
      --driver string   Database driver
  -h, --help            help for dblab
      --host string     Server host name or IP
      --pass string     Password for user
      --port string     Server port
      --ssl string      SSL mode
  -u, --url string      Database connection string
      --user string     Database user

Use "dblab [command] --help" for more information about a command.

Error: postgres://postgres:postgres@localhost:5432/openfindata?sslmode=disable: invalid url

As a bonus problem, my shell is messed up after the crash (typed text on the command line is invisible), and I need to reset it to be able to see my input again.

To Reproduce
Steps to reproduce the behavior:

  1. run ~/path/to/dblab -u postgres://postgres:postgres@localhost:5432/mydb?sslmode=disable
  2. see error above

Expected behavior
A valid url should not fail, and the terminal should be left like it was.

Screenshots
N/A

OS (please complete the following information):

Additional context

Thanks for bringing this to my attention. This is fixed in #75 and properly released in v0.12.1.

Thanks @laurentS