We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using the binary from the release page or building master from the source, the command fails when a schema has not been specified:
master
[!] No schema specified, will run without table and column validation. panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x870c29] goroutine 1 [running]: main.(*SQLVet).Vet(0xc000150ee0) /home/runner/work/sqlvet/sqlvet/main.go:43 +0x29 main.main.func2(0xc000189700?, {0xc00011ebd0?, 0x7?, 0xb7435e?}) /home/runner/work/sqlvet/sqlvet/main.go:147 +0x45 github.com/spf13/cobra.(*Command).execute(0xc00016d808, {0xc000132010, 0x1, 0x1}) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:920 +0x867 github.com/spf13/cobra.(*Command).ExecuteC(0xc00016d808) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044 +0x3a5 github.com/spf13/cobra.(*Command).Execute(...) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:968 main.main() /home/runner/work/sqlvet/sqlvet/main.go:166 +0x1d6
It appears that s.Schema is nil in vet.NewContext(tables: s.Schema.Tables).
s.Schema
vet.NewContext(tables: s.Schema.Tables)
The text was updated successfully, but these errors were encountered:
Reproduces for me too with [email protected]
Sorry, something went wrong.
could you try adding a nil check in there and pass in an empty map when schema is nil?
No branches or pull requests
When using the binary from the release page or building
master
from the source, the command fails when a schema has not been specified:It appears that
s.Schema
is nil invet.NewContext(tables: s.Schema.Tables)
.The text was updated successfully, but these errors were encountered: