Skip to content
New issue

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

Fix get latest panic on single entry changelog #151

Merged
merged 1 commit into from
May 3, 2024

Conversation

h0tw1r3
Copy link
Contributor

@h0tw1r3 h0tw1r3 commented May 3, 2024

$ gh-changelog get --latest
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xafc65d]

goroutine 1 [running]:
github.com/chelnak/gh-changelog/internal/get.changelogWithSingleEntry({0x0, 0x0, {0xc000512428, 0x6}, {0x0, 0x0}, {0x0, 0xeddc4ce80, 0x0}, {0x0, ...}, ...}, ...)
        /home/h0tw1r3/dev/gh-changelog/internal/get/get.go:31 +0x5d
github.com/chelnak/gh-changelog/internal/get.GetLatest({0xc000473340?, 0x0?})
        /home/h0tw1r3/dev/gh-changelog/internal/get/get.go:70 +0x10e
github.com/chelnak/gh-changelog/cmd.glob..func2(0x2354fc0?, {0xe2e32c?, 0x1?, 0x1?})
        /home/h0tw1r3/dev/gh-changelog/cmd/get.go:43 +0x67
github.com/spf13/cobra.(*Command).execute(0x2354fc0, {0xc000519d20, 0x1, 0x1})
        /home/h0tw1r3/dev/go/pkg/mod/github.com/spf13/[email protected]/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x2355860)
        /home/h0tw1r3/dev/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        /home/h0tw1r3/dev/go/pkg/mod/github.com/spf13/[email protected]/command.go:968
github.com/chelnak/gh-changelog/cmd.Execute()
        /home/h0tw1r3/dev/gh-changelog/cmd/root.go:93 +0x25
main.main()
        /home/h0tw1r3/dev/gh-changelog/main.go:10 +0x19

@chelnak
Copy link
Owner

chelnak commented May 3, 2024

Ahh yes fantastic. Good catch!

@chelnak chelnak merged commit dad43c2 into chelnak:main May 3, 2024
1 check passed
@chelnak
Copy link
Owner

chelnak commented May 3, 2024

I will cut another point release now!

@chelnak chelnak added the bug Something isn't working label May 3, 2024
@h0tw1r3 h0tw1r3 deleted the panic/148 branch May 3, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants