Skip to content

Fix get latest panic on single entry changelog#151

Merged
chelnak merged 1 commit into
chelnak:mainfrom
h0tw1r3:panic/148
May 3, 2024
Merged

Fix get latest panic on single entry changelog#151
chelnak merged 1 commit into
chelnak:mainfrom
h0tw1r3:panic/148

Conversation

@h0tw1r3

@h0tw1r3 h0tw1r3 commented May 3, 2024

Copy link
Copy Markdown
Contributor
$ 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/cobra@v1.6.1/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x2355860)
        /home/h0tw1r3/dev/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        /home/h0tw1r3/dev/go/pkg/mod/github.com/spf13/cobra@v1.6.1/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

chelnak commented May 3, 2024

Copy link
Copy Markdown
Owner

Ahh yes fantastic. Good catch!

@chelnak
chelnak merged commit dad43c2 into chelnak:main May 3, 2024
@chelnak

chelnak commented May 3, 2024

Copy link
Copy Markdown
Owner

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