Open vivacarvajalito opened 1 year ago
If the password contains the character '#', the parse don't work
Connect to database
parse "pg://postgres:passw": invalid port ":passw" after host
github.com/k1LoW/tbls/datasource.Analyze /Users/runner/work/tbls/tbls/datasource/datasource.go:57
tbls version 1.60.0
tbls version
Database version postgres 12
OS ( Ubuntu bionic, macOS Calalina, WSL2, etc ) macOS Ventura
Ubuntu bionic
macOS Calalina
WSL2
Shell ( bash, zsh, poworshell, etc ) zsh
bash
zsh
poworshell
Stacktrace or error message from tbls ( If you can, set DEBUG=1)
DEBUG=1
parse "pg://postgres:passw": invalid port ":passw" after host github.com/k1LoW/tbls/datasource.Analyze /Users/runner/work/tbls/tbls/datasource/datasource.go:57 github.com/k1LoW/tbls/cmd.glob..func7 /Users/runner/work/tbls/tbls/cmd/out.go:77 github.com/spf13/cobra.(*Command).execute /Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:916 github.com/spf13/cobra.(*Command).ExecuteC /Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 github.com/spf13/cobra.(*Command).Execute /Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968 github.com/k1LoW/tbls/cmd.Execute /Users/runner/work/tbls/tbls/cmd/root.go:191 main.main /Users/runner/work/tbls/tbls/main.go:34 runtime.main /usr/local/Cellar/go/1.19.5/libexec/src/runtime/proc.go:250 runtime.goexit /usr/local/Cellar/go/1.19.5/libexec/src/runtime/asm_amd64.s:1594
Config ( .tbls.yml )
# DSN (Database Source Name) to connect database dsn: pg://postgres:passw#rd@localhost:5432/test_db
# is the syntax for YAML comments and is not a valid URL.
#
You might want to surround the DSN with a single quart and urlencode.
dsn: 'pg://postgres:passw%23rd@localhost:5432/test_db'
What happened
If the password contains the character '#', the parse don't work
What you expected to happened
Connect to database
What stack trace or error message from tbls did you see?
parse "pg://postgres:passw": invalid port ":passw" after host
Anything else we need to know?
Environment
tbls version
1.60.0Database version postgres 12
OS (
Ubuntu bionic
,macOS Calalina
,WSL2
, etc ) macOS VenturaShell (
bash
,zsh
,poworshell
, etc ) zshStacktrace or error message from tbls ( If you can, set
DEBUG=1
)Config ( .tbls.yml )