Closed herbygillot closed 2 years ago
Thanks for reporting this - this should be fixed in v4.4.3 but let me know if you're still seeing the issue
4.4.3 looks better, but when run with the print
sub-command, we're still seeing panic:
$ .../ticker print
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/achannarasappa/ticker/internal/print.Run.func1(0x1008d0d40, {0x10090b138, 0x0, 0x0})
/opt/macports-test/var/macports/build/_Users_herby_Source_macports-ports_finance_ticker/ticker/work/gopath/src/github.com/achannarasappa/ticker/internal/print/print.go:87 +0x268
github.com/spf13/cobra.(*Command).execute(0x1008d0d40, {0x10090b138, 0x0, 0x0})
/opt/macports-test/var/macports/build/_Users_herby_Source_macports-ports_finance_ticker/ticker/work/gopath/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:854 +0x640
github.com/spf13/cobra.(*Command).ExecuteC(0x1008d0aa0)
/opt/macports-test/var/macports/build/_Users_herby_Source_macports-ports_finance_ticker/ticker/work/gopath/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x404
github.com/spf13/cobra.(*Command).Execute(...)
/opt/macports-test/var/macports/build/_Users_herby_Source_macports-ports_finance_ticker/ticker/work/gopath/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
github.com/achannarasappa/ticker/cmd.Execute()
/opt/macports-test/var/macports/build/_Users_herby_Source_macports-ports_finance_ticker/ticker/work/gopath/src/github.com/achannarasappa/ticker/cmd/root.go:42 +0x30
main.main()
/opt/macports-test/var/macports/build/_Users_herby_Source_macports-ports_finance_ticker/ticker/work/gopath/src/github.com/achannarasappa/ticker/main.go:6 +0x20
Thanks for finding that issue - I've added the missing validation in v4.4.4
OK thanks, confirmed that v4.4.4 is working. The MacPorts port for ticker
has been updated. Closing this issue.
Describe the bug Starting Ticker v4.4.1 for the first time seems to cause a panic?
To Reproduce Steps to reproduce the behavior:
Expected behavior That runs and doesn't panic, or runs and exits cleanly (even with an error exit code if necessary).
Environment (please complete the following information):
Additional context When run in the exact same environment and same way, v4.3.0 starts without issue.