panic creating shell completions
mikelolasagasti opened this issue · 0 comments
mikelolasagasti commented
Describe the bug
Trying to create shell completions for squealer it panics.
To Reproduce
Steps to reproduce the behavior:
- wget https://github.com/owenrumney/squealer/releases/download/v1.1.0/squealer.linux.amd64
- chmod +x squealer.linux.amd64
- ./squealer.linux.amd64 completion
- ./squealer.linux.amd64 completion bash
./squealer.linux.amd64 completion
INFO[0000] Using a git scanner to process completion
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8c60f7]
goroutine 1 [running]:
github.com/owenrumney/squealer/internal/app/squealer/cmd.getScanner(0xc0000b4960, {0x7ffdad5610b5, 0xa})
/home/runner/work/squealer/squealer/internal/app/squealer/cmd/root.go:90 +0x2f7
github.com/owenrumney/squealer/internal/app/squealer/cmd.squeal(0xc000150000, {0xc00012ee10, 0x1, 0x1})
/home/runner/work/squealer/squealer/internal/app/squealer/cmd/root.go:53 +0xe8
github.com/spf13/cobra.(*Command).execute(0xc000150000, {0xc0000b8010, 0x1, 0x1})
/home/runner/work/squealer/squealer/vendor/github.com/spf13/cobra/command.go:856 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0xc000150000)
/home/runner/work/squealer/squealer/vendor/github.com/spf13/cobra/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/work/squealer/squealer/vendor/github.com/spf13/cobra/command.go:902
main.main()
/home/runner/work/squealer/squealer/cmd/squealer/main.go:11 +0x7f